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
what disp parameter we mention for creation of temporary dataset so that we can use it in later steps?
How to override loadlib?
What is the purpose of disp parameter?
what is DSN parameter and DISP parameter is used for?
In job processing, what happens in conversion stage?
what is the use of IEBGENER utility?
How to resolve the error "WER488A JOIN CAPACITY EXCEEDED" I am using SYNCSORT with JOINKEYS to compare 2 files. I am Getting error - > WER488A JOIN CAPACITY EXCEEDED There are 2 files to be compared with about 2 million records each. LRECL is 3665. Can somebody give a pointer as to how to resolve this problem? I am using SYNCSORT with JOINKEYS to compare 2 files. I am Getting error - > WER488A JOIN CAPACITY EXCEEDED There are 2 files to be compared with about 2 million records each. LRECL is 3665. Can somebody give a pointer as to how to resolve this problem?
What is the significance of addrspc parameter in the exec statement?
Explain the function of dd name parameter with a 2 part structure; audit.report?
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 the resolution for sb37 error
how do you create a dataset in a jcl with the same file organisation as that of another existing dataset?
We can use PASS with permanent datasets also. THEN Which is the condition in which we may use PASS (instead of KEEP) with permanent data sets, while there is no need to specify UNIT and VOL for them like temporary data sets (in cas we use KEEP for permanent data sets) ?
What is jcl in mainframe?
I want to join to input files and write the matching fields on to an output file but i dont want the output file a sorted one