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


Example 4. Sort with E15, E35, FILSZ, AVGRLEN and DYNALLOC

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

INPUT
Variable-length records on 3490
OUTPUT
Blocked variable-length records on SYSDA
WORK DATA SETS
Dynamically allocated
USER EXITS
E15 and E35
FUNCTIONS/OPTIONS
FILSZ, AVGRLEN, DYNALLOC
//EXAMP    JOB A400,PROGRAMMER                                  01
//STEP1    EXEC PGM=ICEMAN                                      02
//SYSOUT   DD SYSOUT=A                                          03
//SORTIN   DD DSN=INPUT,VOL=SER=FLY123,                         04
//  UNIT=3490,DISP=OLD                                          05
//SORTOUT  DD DSN=&&OUT,DISP=(,PASS),SPACE=(CYL,(10,12)),       06
//  UNIT=SYSDA,DCB=(RECFM=VB)                                   07
//MODLIB   DD DSN=EXIT1.RTNS,DISP=SHR                           08
//         DD DSN=EXIT2.RTNS,DISP=SHR                           09
//SYSIN    DD *                                                 10
  SORT FIELDS=(23,4,PD,A,10,6,FS,A)                             11
  OPTION DYNALLOC=(3390,3),AVGRLEN=75,FILSZ=E50000              12
  MODS E15=(MODREC,1024,MODLIB),E35=(ADDREC,1200,MODLIB)        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 A.
04-05
SORTIN DD statement. The input data set is named INPUT and resides on 3490 volume FLY123. DFSORT determines from the data set label of this standard labeled tape that the RECFM is V, the LRECL is 120 and the BLKSIZE is 124.
06-07
SORTOUT DD statement. The output data set is temporary and is to be allocated on SYSDA. Because the input is unblocked and the output is to be blocked, RECFM=VB must be specified. DFSORT sets the LRECL from SORTIN and selects an appropriate BLKSIZE.
08-09
MODLIB DD statement. Specifies the load libraries that contain the exit routines. When exit routines reside in more than one library, the libraries must be concatenated using a single DD statement.
10
SYSIN DD statement. DFSORT control statements follow.
11
SORT statement. FIELDS specifies an ascending 4-byte packed-decimal control field starting at position 23 and an ascending 6-byte floating-sign control field starting at position 10.
12
OPTION statement. DYNALLOC=(3390,3) specifies that three 3390 work data sets are to be allocated. AVGRLEN=75 specifies an average record length of 75. AVGRLEN helps DFSORT optimize work space for variable-length record input. FILSZ=E50000 specifies an estimate of 50000 records. Because the 3490 input data set is compacted, DFSORT might not be able to determine the file size accurately unless the data set is managed by DFSMSrmm or a tape management system that uses ICETPEX. Specification of FILSZ can make a significant difference in work space optimization when tape input data sets are not managed.
13
MODS statement. E15 specifies a user exit routine named MODREC. Approximately 1024 bytes are required for MODREC and the system services (for example, GETMAIN and OPEN) it performs. E35 specifies a user exit routine named ADDREC. Approximately 1200 bytes are required for ADDREC and the system services it performs. MODREC and ADDREC reside in the libraries defined by the MODLIB DD statement.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014