SORTOUT, SORTOFxx, SORTOFx, SORTXSUM, and SORTXDUP DD Statements - mfx - 3.1

Syncsort™ MFX Programmers Guide

Product type
Software
Portfolio
Integrate
Product family
Syncsort™ Software
Product
Syncsort™ MFX > MFX
Version
3.1
Language
English
Content type
Programmer’s Guide
Product name
Syncsort™ MFX
Title
Syncsort™ MFX Programmers Guide
Copyright
2024
First publish date
2010
Last updated
2024-11-06
Published on
2024-11-06T17:38:26.716054

The SORTOUT, SORTOFxx, SORTOFx, SORTXSUM, and SORTXDUP DD statements are used to define one or more output files. The FNAMES parameter of the OUTFIL control statement may also specify DD names of output files. All output is directed to SORTOUT unless an inline E35 exit (COBOL output procedure) assumes the full responsibility for output processing. Records eliminated by SUM processing will be written to the SORTXSUM DD statement if the XSUM option was selected on the SUM control statement. Records eliminated by DUPKEYS processing will be written to the SORTXDUP DD statement if the XDUP option was selected on the DUPKEYS control statement. These output data sets may be directed to a BSAM or VSAM supported device, to BatchPipes or z/OS pipes, or to HFS data sets.

Figure 1. Sample SORTOUT/SORTOFxx DD Statements

In the preceding example, the missing DCB parameters except BLKSIZE will default to those assigned to SORTIN or (for a merge application) to those assigned to the last SORTINnn in the JCL stream. The DCB BLKSIZE, if missing, will be determined via system-determined blocksize when it is active or from SORTIN if SORTOUT and SORTIN LRECLs are the same, otherwise MFX will select an appropriate BLKSIZE.

If a sort or a merge has an LRECL specified in the output DD JCL that is found to be smaller than the internally processed record length (determined from SORTIN, the LENGTH values of a RECORD statement, or an INREC statement), MFX processing will be controlled by the SOTRN installation option or its run-time override parameter TRUNC. (SYNCGENR applications are controlled by the SOTRNGN installation option.) If the parameter setting allows truncation, MFX will write the records to the output data set by truncating the records to the LRECL of that data set. The delivered default allows truncation. MFX will not truncate records after OUTREC processing. If the option disallows truncation, a WER462A error message will be issued.

If an application that is processing fixed-length data has an LRECL specified in the SORTOUT or SORTXSUM JCL that is found to be longer than the internally processed record length, MFX will normally pad the output records with binary zeros. See the discussion of the PAD parameter in the section JCL and Sample JCL/Control Statement Streams for additional controls that can be applied to applications with both a SORTIN and a SORTOUT where the SORTOUT LRECL is longer than the SORTIN LRECL. This padding will be done for SORTXSUM and for SORTOUT when OUTFIL is not in use. It will not be done for any OUTFIL files. If the option disallows padding, a WER462A error message will be issued. The delivered default allows padding.

If RECFM is specified and the report writing features of the OUTFIL control statement are being used, the RECFM of the output file must include the 'A' subparameter, except when the REMOVECC parameter is in use.

For a COPY or MERGE, the output file must not be the same as any of the input files.

Note: The TYPE parameter on the RECORD control statement should be specified if SORTIN is VSAM. If TYPE is not provided, the SORTOUT RECFM will be examined to determine the SORTIN TYPE. If no SORTOUT RECFM is found, TYPE=V will be assumed if the SORTOUT is VSAM and TYPE=F if the SORTOUT is non-VSAM.
Note: RLS mode (RLS=CR and RLS=NRI) or Linear VSAM data sets are not supported for input or output.