Example 7
-
The JOB statement gives LINKEXIT as the jobname.
-
The EXEC statement identifies SYNCSORT as the program to be executed.
-
The SYSOUT DD statement assigns the MFX messages to the output device associated with SYSOUT class A.
-
The SORTIN DD statement gives IN.FILE.JANUARY as the input data set name, and specifies a tape unit with the volume serial number 135790. The DISP parameter shows that the data set is already in existence.
The DCB parameter shows an LRECL of 200 bytes, a fixed blocked RECFM, and a 4000-byte BLKSIZE. The LABEL parameter shows that IN.FILE.JANUARY is the second data set on the tape, and that it has a standard label.
-
The SORTOUT DD statement gives OUT.FILE.FEBRUARY as the output data set name, and specifies a tape unit with the volume serial number 097863. The DISP parameter shows that the data set is not in existence yet.
The DCB RECFM and LRECL parameters for SORTOUT default to that of the first SORTIN file. The BLKSIZE will be selected by System Determined BLKSIZE (SDB) if active or by MFX if SDB is not active. The LABEL parameter shows that OUT.FILE.FEBRUARY is to be the first data set on the tape, and will have a standard label.
-
The SORTMODS DD statement defines the partitioned data set that will contain the exit routine object module that has not been link-edited and is being included in the SYSIN data stream. The DISP shows the data set may not be shared.
-
The MODLIB DD statement defines the partitioned data set in which the already link-edited exit routine resides. (Note MODLIB is referenced on the MODS control statement.) The data set name of the exit library is EXIT.NO.ONE. The DISP shows the data set may be shared.
-
The SYSLMOD DD statement defines a temporary data set called &&LINK that will contain the exit routine after it has been link-edited. A direct access device will be used with 1 cylinder reserved for primary space allocation, 1 cylinder for secondary space allocation, and 1 directory block.
-
The SYSLIN DD statement defines the temporary data set that will contain the linkage editor control statements that MFX will use when link-editing the exit. The name of this data set is &&TEMP. It is to be on any sequential-access device with 1 track reserved if the data set is allocated to disk.
-
The SYSPRINT DD statement defines the data set on which the linkage editor will write its messages. Whatever device is assigned to SYSOUT=A will be used.
-
The SYSIN DD statement marks the beginning of the input stream that includes the sort control statements and also the object deck of the exit routine to be link-edited.
-
The SORT control statement shows that one control field will be sorted on. It begins on byte 20 of the record, is 30 bytes long, contains character data, and is to be sorted according to ascending order.
The DYNALLOC parameter specifies that 6 direct access areas are to be reserved for sortwork data sets.
-
The RECORD control statement shows that fixed-length records are being sorted. The LENGTH parameter gives 200 bytes as the length of the records at input time, and, by not specifying values for l2 and l3, implicitly states that the length of these records will not be changed during the sort.
-
The MODS control statement shows that the first exit-type is E15. The name of the routine for this exit is EXIT1. It will take 600 bytes in main storage, resides in a library defined on the MODLIB DD statement, and has already been link-edited.
The second exit-type is E35. The name of the routine for the exit is EXIT2, and it will take 500 bytes in main storage. The object deck for the routine is to be included in the SYSIN portion of the job stream, and, because of the absence of a letter in the last subparameter position for this group, the sort assumes that the routine requires link-editing and will be link-edited together with any other routines for this phase.
-
The SUM control statement’s FIELDS parameter identifies one summed field. It begins on byte 1 of the record, is 10 bytes long, and has zoned decimal data. The rest of the statement is a comment.
-
The END control statement marks the end of the control statements and also contains a comment.
-
The EXIT2 object deck to be link-edited is included after the END statement in the SYSIN stream.
-
The delimiter statement marks the end of the SYSIN input stream for the sort.