- INPUT
- Fixed-length record data set
- OUTPUT
- Fixed-length record data set
- WORK DATA SETS
- Dynamically allocated (by default)
- USER EXITS
- None
- FUNCTIONS/OPTIONS
- INCLUDE, LOCALE
//EXAMP JOB A400,PROGRAMMER 01
//STEP1 EXEC PGM=SORT,PARM='LOCALE=FR_CA' 02
//STEPLIB DD DSN=SYS1.SCEERUN,DISP=SHR 03
//SYSOUT DD SYSOUT=A 04
//SORTIN DD DSN=INPUT.FRENCH.CANADA,DISP=SHR 05
//SORTOUT DD DSN=OUTPUT.FRENCH.CANADA,DISP=OLD 06
//SYSIN DD * 07
SORT FIELDS=(1,20,CH,A,25,1,BI,D,30,10,CH,A) 08
INCLUDE COND=(40,6,CH,EQ,50,6,CH) 09
- Line
- Explanation
- 01
- JOB statement. Introduces this job to the operating system.
- 02
- EXEC statement. Calls DFSORT directly by its alias name SORT.
LOCALE specified in EXEC PARM overrides the installation
default for LOCALE. The locale for the French language and the cultural
conventions of Canada will be active.
- 03
- STEPLIB DD statement. Specifies the Language Environment run-time
library containing the dynamically loadable locales.
- 04
- SYSOUT statement. Directs DFSORT messages and control statements
to sysout class A.
- 05
- SORTIN DD statement. The input data set is named INPUT.FRENCH.CANADA
and is cataloged. DFSORT determines the RECFM, LRECL and BLKSIZE from
the data set label.
- 06
- SORTOUT DD statement. The output data set is named OUTPUT.FRENCH.CANADA
and is cataloged. DFSORT determines the RECFM, LRECL and BLKSIZE from
the data set label.
- 07
- SYSIN DD statement. DFSORT control statements follow.
- 08
- SORT statement. FIELDS specifies an ascending 20-byte character
control field starting at position 1, a one-byte descending binary
control field starting at position 25, and a 10-byte ascending character
control field starting at position 30. The character (CH) control
fields will be sorted according to the collating rules defined in
locale FR_CA.
- 09
- INCLUDE statement. COND specifies that only input records with
equal 6-byte character compare fields starting in position 40 and
position 50 are to be included in the output data set. The character
(CH) compare fields will be compared according to the collating rules
defined in locale FR_CA.