To code report logic

Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.
  1. In the Program Painter, initialize all report counters and set up control heading and footing items with the INITIATE statement.
  2. Process the detail lines with a GENERATE statement. If the report has multiple detail lines, code multiple GENERATE statements.
  3. End report processing with the TERMINATE statement.

Use the following structure:

   NTRY
                .
                .
           OPEN INPUT filename1
           ... OUTPUT filename2
                .
                .
           INITIATE reportname
                .
                .
           IF ...
               GENERATE detlineidentifier
                .
                .
           TERMINATE reportname
                .
                .
           CLOSE filename1 filename2