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


Example 3. Copy with OUTREC, PARSE and BUILD

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

INPUT                 Blocked fixed-length records on disk
OUTPUT                Blocked fixed-length records on disk
WORK DATA SETS        Not applicable
USER EXITS            None
FUNCTIONS/OPTIONS     OUTREC, PARSE, BUILD

//EXAMP JOB A400,PROGRAMMER                                    01
//S1 EXEC PGM=ICEMAN                                           02
//SYSOUT DD SYSOUT=A                                           03
//SORTIN DD DSN=FLY.VAR.FIELDS.IN,DISP=SHR                     04
//SORTOUT DD DSN=FLY.FIX.FIELDS.OUT,DISP=OLD                   05
//SYSIN DD *                                                   06
  OPTION COPY                                                  07
  OUTREC PARSE=(%00=(ABSPOS=21,STARTAFT=BLANKS,                08
                     ENDBEFR=C',',FIXLEN=5),                   09
       %=(ENDBEFR=C','),                                       10
       %01=(ENDBEFR=C',',FIXLEN=10),                           11
       %02=(FIXLEN=7)),                                        12
  BUILD=(1,15,                                                 13
    18:%00,JFY=(SHIFT=RIGHT,LEAD=C'(',TRAIL=C')',LENGTH=7),    14
    30:%02,SFF,TO=ZD,LENGTH=7,                                 15
    40:%01,60:X)                                               16
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 sysout class A.
04
SORTIN DD statement. The input data set is named FLY.VAR.FIELDS.IN and is cataloged. DFSORT determines from the data set label that the RECFM is FB, the LRECL is 60 and the BLKSIZE is 27960.
05
SORTOUT DD statement. The output data set is named FLY.FIX.FIELDS.OUT and is cataloged. DFSORT determines from the data set label that the RECFM is FB, the LRECL is 60 and the BLKSIZE is 27960.
06
SYSIN DD statement. DFSORT control statements follow.
07
OPTION statement. COPY specifies a copy application.
08-16
OUTREC statement. PARSE and BUILD reformat the input records containing one fixed position/length field and four variable position/length fields to output records containing four fixed position/length fields.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014