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


Example 1. Copy with EXEC PARMs, SKIPREC, MSGPRT and ABEND

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

INPUT
Blocked fixed-length records on multivolume 3490
OUTPUT
Blocked fixed-length records on disk
WORK DATA SETS
Not applicable
USER EXITS
None
FUNCTIONS/OPTIONS
SKIPREC, MSGPRT, ABEND
//EXAMP    JOB A400,PROGRAMMER                                  01
//STEP1    EXEC   PGM=SORT,                                     02
//  PARM='SKIPREC=500,MSGPRT=CRITICAL,ABEND'                    03
//SYSOUT   DD SYSOUT=A                                          04
//SORTIN   DD DSN=FLY.RECORDS,VOL=SER=(000333,000343),          05
//  UNIT=(3490,2),DISP=OLD,LABEL=(,NL),                         06
//  DCB=(RECFM=FB,LRECL=12000,BLKSIZE=24000)                    07
//SORTOUT  DD DSN=FLY.RECORDS.COPY,DISP=OLD                     08
//SYSIN DD *                                                    09
  SORT FIELDS=COPY                                              10
Line
Explanation
01
JOB statement. Introduces this job to the operating system.
02-03
EXEC statement. Calls DFSORT directly by its alias SORT. SKIPREC=500 specifies that the first 500 input records are not to be included in the output data set. MSGPRT=CRITICAL specifies that error messages, but not informational messages, are to be printed. ABEND specifies that DFSORT is to terminate with a user ABEND if it issues an error message.
04
SYSOUT DD statement. Directs DFSORT messages and control statements to sysout class A.
05-07
SORTIN DD statement. The input data set is named FLY.RECORDS and resides on 3490 volumes 000333 and 000343. The UNIT parameter requests two tape drives, one for each volume of the data set. Because the tape is unlabeled, DCB parameters must be supplied to indicate that the RECFM is FB, the LRECL is 12000 and the BLKSIZE is 24000.
08
SORTOUT DD statement. The output data set is named FLY.RECORDS.COPY and is cataloged. DFSORT determines the RECFM, LRECL and BLKSIZE from the data set label.
09
SYSIN DD statement. DFSORT control statements follow.
10
SORT statement. FIELDS=COPY specifies a copy application.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014