Previous Topic Next topic Print topic


To code input-output statements for reports

Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.
  1. In the Report Painter, specify the FILE-CONTROL SELECT information with the Program Painter IO keyword, using dataname, "literal" or EXTERNAL externalfilename|ddname as follows:
       IO      filename ASSIGN [TO] dataname
                                    "literal"
                                    EXTERNAL externalfilename|ddname
               ORGANIZATION IS RECORD SEQUENTIAL
                               LINE
  2. Code the program input file description, using the FD keyword and the following format:
       FD      inputfilename
               LABEL RECORDS clause
               BLOCK CONTAINS clause
               [Other applicable COBOL FD clauses]
       01      inputrecordname              PIC clause.

    For example:

  3. Determine the output record size. The default size is 133, the standard mock-up size of 132 plus 1 byte for the carriage control character. To define a different report record size, calculate the size as follows.

    Record Size =

    Report mock-up size (maximum 247 characters)

    + 1 byte for carriage control

    + 2 bytes for the CODE clause, if used

  4. Code the program output file description, using the FD keyword and the following format. To accept the default record size, omit the RECORD CONTAINS clause.
       FD      outputfilename
               LABEL RECORDS clause
               [RECORD CONTAINS clause]
               [Other applicable COBOL FD clauses]
               REPORT IS|ARE reportname1 [... reportname15]
       01      outputrecordname              PIC clause.

    For example:

Previous Topic Next topic Print topic