Previous Topic Next topic Print topic


TP-LINKAGE

Handle addressability of Linkage Section data records in a called program.
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.

Targets:

  • CICS
  • DLG
  • IMS DC

Syntax:

TP-LINKAGE linkdataname[/
copybookname|rulefilename]
... [linkdataname[/copybookname|rulefilename] ...]

General Rules

  1. Code call on the first line of the Linkage Section.
  2. List data items in the order that they appear in the Linkage Section, copybook, or rule file.
  3. Make sure that each linkdataname you specify is defined in the Linkage Section. Choose one of the following methods:
    • Define them yourself.
    • Include (using TP-LINKAGE) a copybook or rule file that contains the linkdatanames.
  4. TP-LINKAGE generates a % INCLUDE to include the copybook or macro. If you want TP-LINKAGE to generate a COBOL COPY statement, instead of a % INCLUDE statement, code &TP-COPY-LINKAGE = 1 prior to the TP-LINKAGE call.
  5. In Online Express, list the records in the order they pass from the calling program.

General Rules: for CICS

  1. Use TP-LINKAGE with calls that use the SET option.

  2. Coding TP-LINKAGE with the SYLT keyword ensures that the AMB-generated DFHCOMMAREA is the first record in the Linkage Section. This prevents the CICS translator from generating an additional one.
  3. One BLL cell is generated per 4,096 bytes. Linkage records longer than 4,096 bytes require additional BLL cells to establish addressability to the entire record.
  4. To generate additional BLL cells, code dummy records after the record that is greater than 4,096 bytes. A dummy record name must be prefixed with DUMMY and its copybook name must be DUMMY.
  5. BLL cells are not used with COBOL/2.

General Rules: for DLG

  1. AMB provides this call for compatibility with CICS and IMS--it is not required to handle addressability of Linkage Section records.
  2. Make the linkdataname a PARM area and the only area defined in the Linkage Section, if the PROGRAM CONTROL TRANSFER option is SELECT.

General Rules: for IMS DC

  1. Code the call on the first line of the Linkage Section, and with either NTRY or PROC to generate parameters for the PROCEDURE DIVISION USING statement.
  2. Do not define PCBs with TP-LINKAGE; the subschema defines them.

Examples:

Define records LINK-REC-1 and LINK-REC-2. Include definitions from USERMACS rule members LINKR1 and LINKR2.
TP-LINKAGE LINK-REC-1/LINKR1 LINK-REC-2/LINKR2
Define records LINK-REC-1 and LINK-REC-2 and copy their definitions from COPYLIB members LINKR1 and LINKR2.
% &TP-COPY-LINKAGE = 1
TP-LINKAGE LINK-REC-1/LINKR1 LINK-REC-2/LINKR2
Define records LINK-REC-1 and LINK-REC-2, coded in the Linkage Section.
TP-LINKAGE LINK-REC-1 LINK-REC-2
Define records LINK-REC-1 and LINK-REC-2. LINK-REC-1 has been coded in the Linkage Section; LINK-REC-2 is copied from COPYLIB member LINKR2.
% &TP-COPY-LINKAGE = 1
TP-LINKAGE LINK-REC-1 LINK-REC-2/LINKR2
LINK-REC-1       PIC X(100).

CICS

Linkage record containing 10,000 bytes.
 SYLK   TP-LINKAGE LINK-REC
        ... DUMMY-LINK-REC-BLL1/DUMMY
        ... DUMMY-LINK-REC-BLL2/DUMMY
 LK01   LINK-REC.
        05  LINK-REC-1-4096       PIC X(4096).
        05  LINK-REC-2-8192       PIC X(4096).
        05  LINK-REC-3-10000      PIC X(1808).
 OPT    PROG
 NTRY
        CIC-GETMAIN
        ... SET(LINK-REC)
        ... LENGTH(10000)
        /* PROGRAM HAS ADDRESSABILITY TO
        /* THE FIRST 4,096 BYTES.
        ADD 4096 LINK-REC--P
        ... GIVING DUMMY-LINK-REC-BLL1--P
        ... GIVING DUMMY-LINK-REC-BLL2--P
        /* PROGRAM HAS ADDRESSABILITY TO 
        /* ALL 10,000 BYTES.

DLG

Define a PARM area for use by TP-LINK and TP-ENTRY. The PROGRAM CONTROL TRANSFER option has been set to SELECT. PGM-PARM-DATA is coded inline. Note You can place the PGM-PARM-DATA area in Linkage without the use of TP-LINKAGE.
 SYLK   TP-LINKAGE PGM-PARM-DATA
 LK01   PGM-PARM-DATA.
            05  PGM-PARM-DATA-LEN   PIC S9(04) COMP.
            05  PGM-PARM-EMPNBR     PIC X(05).
            05  FILLER              PIC X(95).
Previous Topic Next topic Print topic