how to write a jcl prog to copy alternate recs from ps1 to
another ps2,suppose ps1 having 10 recs?
Answers were Sorted based on User's Feedback
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 |
Answer / mahesh
//step1 exec pgm=iebgener
//sysut1 dd dsn=fss149.mahesh.ps1,disp=(shr)
//sysut2 dd dsn=fss149.mahesh.ps2,disp=shr
Is This Answer Correct ? | 2 Yes | 23 No |
What methodology can be adapted to transfer data to a program that is coded using the exec statement?
What is the purpose of disp parameter?
How to alter the parameters for the existing gdg?
What is the difference between a PDS member and a GDG Generation ? Is it only this, that with a generation we can use +1, 0, -1 etc while with PDS member we can not ?
In job processing, what happens in execution stage?
Hi Please try to be to-the-point. 1) How to INCLUDE a JCL segment in a JOB ? (A Small example) 2) What is SPOOL and what is SPOOL FULL ? and how to direct the output of a Jobstep to SPOOL ?
why do we use file-aid wht r the adv of using file-aid thn in ispf
what is mainframe?
What is the meaning of data definition name (ddname) and dataset name (dsname) in the DD statement?
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?
Describe the JOB statement, its meaning, syntax and significant keywords?
describe the dd statement,its meaning,syntax and keywords?