how to write a jcl prog to copy alternate recs from ps1 to
another ps2,suppose ps1 having 10 recs?
Answer Posted / vaneesh khurana
To do so we require OUTFIL and SPLIT option of DFSORT.
//STEPNAME EXEC PGM=SORT
//SORTIN DD DSN=SORTIN.INPUT.FILE.TO.SPLIT,DISP=SHR
//PS1 DD DSN=PS1.FILE,DISP=SHR
//PS2 DD DSN=PS2.FILE,DISP=SHR
//SYSIN DD *
OUTFIL FNAMES=(PS1,PS2),SPLIT
/*
This will write 1st, 3rd,5th ....record in the PS1 and
2nd,4th,6th ....record in ps2 file.
| Is This Answer Correct ? | 14 Yes | 3 No |
Post New Answer View All Answers
Does jcl support automatic restart?
how you can access an uncataloged dataset in a JCL?
whats the diff bw the evaluate also and and?
What are the difference between jcl and jes?
What is NOTCAT ?
Can we use DISP=SHR in output file in JCL
How do you access an uncatalogued dataset in a jcl?
Suppose I have five jobs to do. But I want to hold one?
if the submitter of a job wants to inform another user about the job completion, how can it be done?
Explain about LMQUERY�give a dialog information about a data set
What is the significance of addrspc parameter in the exec statement?
What are the 4 fields in dd statement?
What statement marks the beginning of an in-stream or cataloged procedure in jcl and assigns default values to parameters defined in the procedure?
How to override a dsn that is contained in a proc called by another proc? I need to do the override in the calling jcl?
what is use of dcb parameter in dd statement?