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


Example 2. Merge with LOCALE and OUTFIL

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

INPUT
Fixed-length record data set
OUTPUT
Multiple fixed-length record data sets
WORK DATA SETS
Not applicable
USER EXITS
None
FUNCTIONS/OPTIONS
LOCALE, OUTFIL
//EXAMP    JOB  A400,PROGRAMMER                                 01
//STEP1    EXEC PGM=SORT                                        02
//STEPLIB  DD  DSN=SYS1.SCEERUN,DISP=SHR                        03
//SYSOUT   DD  SYSOUT=A                                         04
//SORTIN01 DD  DSN=INPUT01.GERMAN.GERMANY,DISP=SHR              05
//SORTIN02 DD  DSN=INPUT02.GERMAN.GERMANY,DISP=SHR              06
//SORTIN03 DD  DSN=INPUT03.GERMAN.GERMANY,DISP=SHR              07
//GP1      DD  DSN=OUTPUT.GERMAN.GP1,DISP=OLD                   08
//GP2      DD  DSN=OUTPUT.GERMAN.GP2,DISP=OLD                   09
//GP3      DD  DSN=OUTPUT.GERMAN.SAVE,DISP=OLD                  10
//DFSPARM  DD  *                                                11
 LOCALE=De_DE.IBM-1047                                          12
 MERGE FIELDS=(25,5,CH,A,40,4,PD,D)                             13
 OUTFIL FNAMES=GP1,                                             14
   INCLUDE=(23,1,CH,LE,C'Ö')                                    15
 OUTFIL FNAMES=GP2,                                             16
   INCLUDE=(23,1,CH,GT,C'Ö',AND,                                17
            23,1,CH,LT,C'Ü')                                    18
 OUTFIL FNAMES=GP3,SAVE                                         19
Line
Explanation
01
JOB statement. Introduces this job to the operating system.
02
EXEC statement. Calls DFSORT directly by its alias name SORT.
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
SORTIN01 DD statement. The first input data set is named INPUT01.GERMAN.GERMANY and is cataloged. DFSORT determines the RECFM, LRECL and BLKSIZE from the data set label.
06
SORTIN02 DD statement. The second input data set is named INPUT02.GERMAN.GERMANY and is cataloged. DFSORT determines the RECFM, LRECL and BLKSIZE from the data set label.
07
SORTIN03 DD statement. The third input data set is named INPUT03.GERMAN.GERMANY and is cataloged. DFSORT determines the RECFM, LRECL and BLKSIZE from the data set label.
08
GP1 DD statement. The first OUTFIL output data set is named OUTPUT.GERMAN.GP1 and is cataloged. DFSORT determines the RECFM, LRECL and BLKSIZE from the data set label.
09
GP2 DD statement. The second OUTFIL output data set is named OUTPUT.GERMAN.GP2 and is cataloged. DFSORT determines the RECFM, LRECL and BLKSIZE from the data set label.
10
GP3 DD statement. The third OUTFIL output data set is named OUTPUT.GERMAN.GP3 and is cataloged. DFSORT determines the RECFM, LRECL and BLKSIZE from the data set label.
11
DFSPARM DD statement. DFSORT control statements follow.
12
LOCALE parameter. Overrides the installation default for LOCALE. The locale for the German language and the cultural conventions of Germany based on the IBM-1047 encoded character set will be active.
13
MERGE statement. FIELDS specifies an ascending 5-byte character control field starting at position 25, and a descending 4-byte packed decimal control field starting at position 40. The character (CH) control field will be merged according to the collating rules defined in locale De_DE.IBM-1047. The records in each input data set must already be in the order specified.
14-15
OUTFIL statement. The subset of records with character values less than or equal to 'Ö' in position 23 are written to the GP1 output data set. The character (CH) compare field and character constant will be compared according to the collating rules defined in locale De_DE.IBM-1047.
16-18
OUTFIL statement. The subset of records with character values greater than 'Ö' but less than 'Ü' in position 23 are written to the GP2 output data set. The character (CH) compare fields and character constants will be compared according to the collating rules defined in locale De_DE.IBM-1047.
19
OUTFIL statement. Any records not written to the GP1 or GP2 output data sets are written to the GP3 output data set.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014