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 is the function of //jcllib statement?
Is it possible to left uncode disp?
I have a cobol db2 program(PGM A) where other program (PGM B) will call this program and passes some 50 fields data to PGM A. PGM A has some layout in which it receives the data from PGM B. And this layout has been copied in the linkage section pf PGM A. After getting the data, PGM A writes the data in a flat file in the same layout which it receives from PGM B. PGM B is a simple COBOL pgm. Please provide a JCL to run these programs.
Explain the purpose of the dd keylen parameter?
IIN APITUDE THEY GAVE ONLY 10 QUESTIONS.. THEY ARE SIMPLE ONE FROM NUMBER SERIES,BOATS,TIME & DISTANCE,PROFIT &LOSS,FIND OUT THE NUMBER ? 9 25 4 36 81 64 49 AND surveillance SPELLINGS E.T.C
What are the rules employed while naming the steps in a job?
What are the parameter we cannot use in procedure? How many instream we can write in single jcl?
What is the motivation behind coding class parameter in job statement?
Is condition checking possible in jcl?
Explain the function of job statement in jcl?
What are the jcl procedures?
Many jcl statements contain specific values designed to direct and control the execution of the statement. What are these fields called?
What is the purpose of dd dummy statement?
What statement can be used to send data to another mvs jes3 node?
what happens in conversion stage in job processing?