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


E15 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 E15 (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  NEW-REC            PIC X(100).
   01  RETURN-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  UNUSED5            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 E15 (Variable-Length Record)
   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  NEW-REC.
       05 NREC OCCURS 1 TO 200 TIMES
               DEPENDING ON NEW-REC-LEN      PIC X.
   01  RETURN-REC.
       05 RREC OCCURS 1 TO 200 TIMES
               DEPENDING ON RETURN-REC-LEN   PIC X.
   01  UNUSED1            PIC 9(8) BINARY.
   01  UNUSED2            PIC 9(8) BINARY.
   01  NEW-REC-LEN        PIC 9(8) BINARY.
   01  RETURN-REC-LEN     PIC 9(8) BINARY.
   01  UNUSED3            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