Previous Topic Next topic Print topic


Code Report Logic

Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.

Code the Procedure Division logic under the NTRY (or PROC) keyword to produce and generate the report.

In AMB with all versions of COBOL except OS/VS COBOL, you can use the automatic page and date features by coding ACCEPT statements in your Procedure Division Code, as follows:

ACCEPT WS-fieldname FROM DATE
ACCEPT WS-fieldname FROM PAGE

For example:

   NTRY
           OPEN INPUT INPUT-FILE
           ...OUTPUT REPORT-OUTPUT-FILE
           ACCEPT WS-DATE-HOLD FROM DATE
           MOVE WS-DATE-YY-X TO WS-DATE-YY
           MOVE WS-DATE-MM-X TO WS-DATE-MM
           MOVE WS-DATE-DD-X TO WS-DATE-DD
           INITIATE STOCK-REPORT
           REPEAT
               READ INPUT-FILE INTO WS-PART-STOCK-REC
           UNTIL AT END ON INPUT-FILE
               GENERATE DETAIL-LINE
           TERMINATE STOCK-REPORT
           CLOSE INPUT-FILE
           ... REPORT-OUTPUT-FILE
Previous Topic Next topic Print topic