- INPUT
- VSAM TYPE=V records
- OUTPUT
- VSAM TYPE=V records
- WORK DATA SETS
- Dynamically allocated
- USER EXITS
- None
- FUNCTIONS/OPTIONS
- Override of Various Options
//EXAMP JOB A400,PROGRAMMER 01
//S1 EXEC PGM=SORT 02
//SYSOUT DD SYSOUT=A 03
//SORTIN DD DSN=TEST.SORTIN.FILE,DISP=SHR 04
//SORTOUT DD DSN=TEST.SORTOUT.FILE,DISP=SHR 05
//DFSPARM DD * 06
RECORD TYPE=V 07
SORT FIELDS=(30,4,BI,A) 08
OPTION HIPRMAX=10,DYNALLOC=3390,MAINSIZE=3M, 09
MSGPRT=CRITICAL,NOLIST 10
For purposes of illustration, assume that none of the standard
installation defaults for batch direct invocation of DFSORT have been
changed by the site.
- Line
- Explanation
- 01
- JOB statement. Introduces this job to the operating system.
- 02
- EXEC statement. Calls DFSORT directly by its alias SORT.
- 03
- SYSOUT DD statement. Directs DFSORT messages and control statements
to system output class A.
- 04
- SORTIN DD statement. The input data set is TEST.SORTIN.FILE.
DFSORT determines that it is a VSAM data set and obtains its attributes
from the catalog.
- 05
- SORTOUT DD statement. The output data set is TEST.SORTOUT.FILE.
DFSORT determines that it is a VSAM data set and obtains its attributes
from the catalog.
- 06
- DFSPARM DD statement. DFSORT control statements follow. DFSPARM
can be used for both direct-invocation and program-invocation of DFSORT
and overrides options and statements from all other sources. Certain
operands, such as MSGPRT and LIST/NOLIST, are used if supplied in
DFSPARM, the EXEC PARM or the invocation parameter list, but not used
if supplied in SYSIN or SORTCNTL.
- 07
- RECORD statement. TYPE=V specifies that DFSORT is to treat
the VSAM records as variable-length. In this case, the RECORD statement
could be omitted, because DFSORT would automatically set a record
type of V due to the use of VSAM data sets for SORTIN and SORTOUT.
- 08
- SORT statement. FIELDS specifies an ascending 4-byte binary
control field starting at position 30. This position corresponds
to a specification of KEYS(4 25) for the VSAM CLUSTER (4 bytes at
offset 25, which is equivalent to position 26 with 4 bytes added for
the RDW that DFSORT supplies at input and removes at output for VSAM
TYPE=V records).
- 09-10
- OPTION statement. HIPRMAX=10 specifies that up to 10 MBs of
Hiperspace can be used for Hipersorting, overriding the standard installation
default of HIPRMAX=OPTIMAL. DYNALLOC=3390 specifies that work data
sets are to be allocated on 3390s, overriding the standard installation
default of SYSDA. The standard installation default of four work data
sets is not overridden. MAINSIZE=3M specifies that up to 3 MBs of
storage can be used, overriding the standard installation default
of MAINSIZE=MAX. MSGPRT=CRITICAL specifies that only error messages
are to be printed, overriding the standard installation default of
MSGPRT=ALL. NOLIST specifies that control statements are not to be
printed, overriding the standard installation default of LIST=YES.