Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Compiler and Runtime Migration Guide


Example 1: Receiving a communications area

In this example, a COBOL program defines a record area within the LINKAGE SECTION. This technique is used in a number of COBOL CICS programs that define structures outside the WORKING-STORAGE SECTION.

During conversion, do the following steps:

  1. Remove the address list definition defining the BLL cells; with Enterprise COBOL, BLL cells are no longer explicitly defined in the LINKAGE SECTION.
  2. In SET option of the CICS command, use the ADDRESS OF special register when referring to the storage area, instead of specifying the BLL cell name.
           OS/VS COBOL                            Enterprise COBOL


LINKAGE SECTION.                           LINKAGE SECTION.
01  PARAMETER-LIST.
  05  PARM-FILLER      PIC S9(8) COMP.
  05  PARM-AREA1-PTR   PIC S9(8) COMP.
  05  PARM-AREA2-PTR   PIC S9(8) COMP.
01  AREA1.                                01  AREA1.
   05  AREA1-DATA        PIC X(100).             05  AREA1-DATA    PIC X(100).
01  AREA2.                                01  AREA2.
   05  AREA2-DATA        PIC X(100).             05  AREA2-DATA    PIC X(100).
          .                                        .
          .                                        .
  PROCEDURE DIVISION.                             PROCEDURE DIVISION.
          .                                        .
          .                                        .
    EXEC CICS READ DATASET("INFILE")              EXEC CICS READ DATASET("INFILE")
       RIDFLD(INFILE-KEY)                             RIDFLD(INFILE-KEY)
       SET(PARM-AREA1-PTR)                        SET(ADDRESS OF AREA1)
       LENGTH(RECORD-LEN)                             LENGTH(RECORD-LEN).
    SERVICE RELOAD PARM-AREA1-PTR.

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)