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


Example 11. Sort with Pipes and OUTFIL SPLIT

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

INPUT
Pipes
OUTPUT
Pipes
WORK DATA SETS
Dynamically allocated
USER EXITS
None
FUNCTIONS/OPTIONS
FILSZ, OUTFIL, DYNALLOC
//EXAMP   JOB A400,PROGRAMMER                                   01
//RUNSORT EXEC PGM=ICEMAN                                       02
//SYSOUT  DD SYSOUT=H                                           03
//SORTIN  DD DSN=INPUT.PIPE,SUBSYS=PIPE,                        04
//           DCB=(LRECL=60,RECFM=FB,BLKSIZE=32760)              05
//OUT1    DD DSN=OUTPUT.PIPE1,SUBSYS=PIPE,                      06
//           DCB=(LRECL=60,RECFM=FB,BLKSIZE=32760)              07
//OUT2    DD DSN=OUTPUT.PIPE2,SUBSYS=PIPE,                      08
//           DCB=(LRECL=60,RECFM=FB,BLKSIZE=32760)              09
//SYSIN   DD *                                                  10
  OPTION DYNALLOC,FILSZ=U1000000                                11
  SORT FIELDS=(1,20,CH,A,25,4,BI,A)                             12
  OUTFIL FNAMES=(OUT1,OUT2),SPLIT                               13
Line
Explanation
01
Job statement. Introduces this job to the operating system.
02
EXEC statement. Calls DFSORT directly.
03
SYSOUT DD statement. Directs DFSORT messages and control statements to system output class H.
04-05
SORTIN DD statement. The SUBSYS=PIPE parameter directs the allocation to the 'PIPE' subsystem for the pipe named INPUT.PIPE. The DCB statement describes the data set characteristics to subsystem PIPE.
06-07
OUT1 DD statement. The SUBSYS=PIPE parameter directs the allocation to the 'PIPE' subsystem for the pipe named OUTPUT.PIPE1. The DCB statement describes the data set characteristics to subsystem PIPE.
08-09
OUT2 DD statement. The SUBSYS=PIPE parameter directs the allocation to the 'PIPE' subsystem for the pipe named OUTPUT.PIPE2. The DCB statement describes the data set characteristics to subsystem PIPE.
10
SYSIN DD statement. DFSORT control statements follow.
11
OPTION statement. DYNALLOC specifies that work data sets are to be dynamically allocated using the installation defaults for type of device and number of devices. FILSZ=U1000000 specifies an estimate of one million input records.
12
SORT statement. FIELDS specifies an ascending 20-byte character control field starting at position 1 and an ascending 4 byte binary control field starting at position 25.
13
OUTFIL statement. The records from the SORTIN pipe are sorted and written alternatively to the OUT1 and OUT2 pipes (that is, the sorted records are split evenly between the two output pipes).

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014