Skip to Content
Custom Search

SORT JCL to Copy all records

 

SORT JCL to Copy all records
 
 
If you wish to copy all records in a file to another file using SORT you can use the
following SORT parm
 
 
SORT FIELDS=COPY
 
 
Example JCL is provided below.
; ; ; ;
 
//SETP001  EXEC PGM=SORT                                         
//SYSPRINT DD SYSOUT=*                                           
//SYSOUT   DD SYSOUT=*                                           
//SYSUDUMP DD SYSOUT=*                                           
//REPORT1  DD SYSOUT=*                                           
//SORTIN   DD DISP=SHR,DSN=USERID.ABC.INPFILE,
//SORTOUT  DD DSN=USERID.ABC.OUTFILE,
//      DISP=(,CATLG),                                           
//      SPACE=(TRK,(30,10),RLSE),                                
//      UNIT=SYSDA,                                              
//      DCB=(RECFM=FB,LRECL=80,BLKSIZE=0,DSORG=PS)               
//SORTWK01 DD  UNIT=DISK,SPACE=(CYL,(20,5),RLSE)                 
//SORTWK02 DD  UNIT=DISK,SPACE=(CYL,(20,5),RLSE)     
//SORTWK03 DD  UNIT=DISK,SPACE=(CYL,(20,5),RLSE)     
//SYSIN    DD *                                      
 SORT FIELDS=COPY
/*                                                   
//*  

Comments

Problem Statement: Write a

Problem Statement:

Write a program, which shows the usage the of positional sub-parameters (MSGLEVEL, SPACE, DISP, COND). The program should have two steps. First step should copy the contents of an existing dataset into a new dataset. The second step should print the dataset if the copy step is not executed.

Post new comment

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

Click the +1 button  below to share it with your friends and colleagues

 

Share this if you liked it!

 

Disclaimer



Who's online

There are currently 0 users and 17 guests online.
Dr. Radut | page