01

Use the 01 keyword to:
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.
  • Define the input and output files in a batch program File Section.
  • Define a data structure in Working-Storage or Linkage Section.
  • Copy a data structure into the Working-Storage or Linkage Section.
  • Define AppMaster Builder Report Writer statements for headings, footers, or detail lines.

Syntax: for Format 1, define input or output files

 IO     filename ASSIGN [TO] ...
        ORGANIZATION IS ...
 01     input|outputrecordname         PIC clause

Syntax: for Format 2, define a data structure

 01     COBOLdatastructure
        [05  COBOLdatastructure]

Syntax: for Format 3, copy a data structure

 01     COBOLcopystatement

Syntax: for Format 4, define Report Writer line types

 01    [dataname] TYPE [IS] reportgroup
       [NEXT GROUP [IS] number|PLUS number|NEXT PAGE][.]
       [LINE [NUMBER IS] number|PLUS number|NEXT PAGE]
       MOCKUP|M LINE|LINES linenumber1 [THRU linenumberN]
       [O[VERPRINT] WHEN "characterstring" AT COLUMN column]
       [S[OURCE] [IS] dataname [options]]
       [V[ALUE] [IS] literal]
       [R[EFERENCE [IS] dataname PIC[TURE] [IS] picclause
           [options]]
        [SUM|+ [IS] dataname [dataname] ...
            [UPON detailgroup [detailgroup] ...]
            [RESET [ON] [FINAL] dataname]
            [options]]

Comments:

  • You must provide all necessary COBOL punctuation.
  • The following COPY statement formats are available for OS/VS COBOL. They are not supported by other versions of COBOL, where the LANGLVL compiler option is set to 1.
     01     COPY copybookname
     01     dataname COPY copybookname
     01     dataname
                COPY copybookname
     01     dataname COPY copybookname
                REPLACING fieldname1 BY fieldname2

    To write subordinate elementary data elements, include the level numbers in columns 12 - 72.

  • If you are using a non-OS/VS version of COBOL, or your copybook contains an indexed table, enter the SWYS or SYLK keyword in the KYWD column and the % INCLUDE statement, rather than a COBOL COPY statement. % INCLUDE inserts the copybook into the program before precompilation, so the AppMaster Builder Precompiler can interpret the index. The preceding section keyword determines the placement of a data structure in the generated program. Associated section keywords are:
    FD File Section (seeFD )
    SD Sort File Description (see SD)
    LK Linkage Section (see LK)
    WS Working-Storage Section (see WS)