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
a dd statement has 2 types of parameters. Name them?
How to do automated restart when a job abend?
what is the use of IEBGENER utility?
what is a jcl?
What are the 2 types of parameters in dd statement?
What does a disposition of (new,catlg,keep) for a dsn mean?
Explain the job statement in jcl?
Can anybody tell what is tool used to generate the list of PROCS used in JCL to generate a PROCTREE
what is use of disp parameter in dd statement?
What is the difference between run mode and addressing mode?
What are steplib and joblib?
I had Records in file Like this Company Code IBM 2 IBM 1 IBM 4 WIPRO 3 WIPRO 2 WIPRO 9 TCS 4 TCS 6 TCS 3 i want the record of every company with highest code How can i do that?
How to run cobol program using jcl?
which parameter is used to check the syntax of a jcl without executing it?
which utility is used to sort a file in jcl?