z/OS DFSORT Application Programming Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


E35 LINKAGE SECTION examples

z/OS DFSORT Application Programming Guide
SC23-6878-00

Figure 1 is an example of the LINKAGE SECTION code for a fixed-length record (FLR) data set with a logical record length (LRECL) of 100. The example shows the layout of the fields passed to your COBOL routine.

Figure 1. LINKAGE SECTION Code Example for E35 (Fixed-Length Records)
LINKAGE SECTION.
   01  RECORD-FLAGS       PIC 9(8) BINARY.
       88  FIRST-REC            VALUE 00.
       88  MIDDLE-REC           VALUE 04.
       88  END-REC              VALUE 08.
   01  LEAVING-REC        PIC X(100).
   01  RETURN-REC         PIC X(100).
   01  OUTPUT-REC         PIC X(100).
   01  UNUSED1            PIC 9(8) BINARY.
   01  UNUSED2            PIC 9(8) BINARY.
   01  UNUSED3            PIC 9(8) BINARY.
   01  UNUSED4            PIC 9(8) BINARY.
   01  EXITAREA-LEN       PIC 9(4) BINARY.
   01  EXITAREA.
       05  EAREA   OCCURS 1 TO 256 TIMES
               DEPENDING ON EXITAREA-LEN   PIC X.

Figure 2 is an example of the LINKAGE SECTION code for a variable-length record (VLR) data set with a maximum LRECL of 200. The example shows the layout of the fields passed to your COBOL routine.

Figure 2. LINKAGE SECTION Code Example for E35 (Variable-Length Records)
   LINKAGE SECTION.
   01  RECORD-FLAGS       PIC 9(8) BINARY.
       88  FIRST-REC            VALUE 00.
       88  MIDDLE-REC           VALUE 04.
       88  END-REC              VALUE 08.
   01  LEAVING-REC.
       05 LREC OCCURS 1 TO 200 TIMES
               DEPENDING ON LEAVING-REC-LEN      PIC X.
   01  RETURN-REC.
       05 RREC OCCURS 1 TO 200 TIMES
               DEPENDING ON RETURN-REC-LEN   PIC X.
   01  OUTPUT-REC.
       05 OREC OCCURS 1 TO 200 TIMES
               DEPENDING ON OUTPUT-REC-LEN   PIC X.
   01  UNUSED1            PIC 9(8) BINARY.
   01  LEAVING-REC-LEN    PIC 9(8) BINARY.
   01  RETURN-REC-LEN     PIC 9(8) BINARY.
   01  OUTPUT-REC-LEN     PIC 9(8) BINARY.
   01  EXITAREA-LEN       PIC 9(4) BINARY.
   01  EXITAREA.
       05  EAREA   OCCURS 1 TO 256 TIMES
               DEPENDING ON EXITAREA-LEN   PIC X.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014