CA, CA05, and CADS

Redefine the Commarea to pass data between programs. See TP-COMMAREA.
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.

Syntax: for Format 1

 CA     datastructure

Syntax: for Format 2

 CA05   COBOLdatastructure

Syntax: for Format 3

 CADS   datastructurename

Comments:

  • All formats generate an 05-level REDEFINES TP-USERAREA for the TP-USERAREA data structure and all other data elements at the same indentation level.
  • When using Formats 1 and 3, code the data structure in the Data Structure Editor format; when using Format 2, code in COBOL format.
  • A CA keyword is invalid in a batch program.
  • &TP-USER-LEN controls the size of TP-USERAREA. Change the size of this area by coding % &TP-USER-LEN=nnn, with a length greater than zero. Code this variable with the SYM1 or SYM2 keyword.

Examples:

 IO     INPUT-FILE ASSIGN TO UT-S-INPUT
 IO     OUTPUT-FILE ASSIGN TO UT-S-OUTPUT
 FD     INPUT-FILE
        LABEL RECORDS ARE STANDARD
        BLOCK CONTAINS 0 RECORDS
 01     INPUT-REC        PIC X(80).
 DS01   INPUTREC
 FD     OUTPUT-FILE 
        LABEL RECORDS ARE STANDARD
        BLOCK CONTAINS 0 RECORDS
 REC    OUTPUT-REC       X80
 01     OUTPUT-REC-R REDEFINES OUTPUT-REC. 
        ...COPY OUTREC.
 CA     CA-INPUT-REC 
          CA-IN-PART-NO       N8
          CA-IN-DESC          X50
          CA-IN-BASE-PRICE    N6V2
 CADS   CAOUTREC