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
How do you access an uncatalogued dataset in a jcl?
In sms datasets, what is the function of the dd mgmtclas keyword?
What is the job entry system used in your project? based on what criteria the sequence of jobs are picked if priority is not mentioned in the job card?
Suppose there are 2 Input files Infile-1 and Infile-2. Both the Files contain Employee Records. You need to compare both the files and Write the Common Records in third file named Outfile. How can we do this using File-Aid?
What are the parameter we cannot use in procedure? How many instream we can write in single jcl?
How does the jcl specify the job to os?
how can the same proc be re-used and called by many jobs?
What is catelog procedure and how many catelog procedure to use in one job?
Can anybody tell what is tool used to generate the list of PROCS used in JCL to generate a PROCTREE
Name a few IBM utility programs, and explain its function.
What do you understand by the term job time – out and how can you overcome that?
what is the use of JCL?
What statement can be used to send data to another mvs jes3 node?
Give the syntax of job specifying jcl statement.
What does a disposition of (MOD,DELETE,DELETE) mean ?