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
Explain how can values be passed from the job stream to an executable program?
what is the difference between JES3 and JES2?
How is the record format of an output dataset specified?
Explain the function of dd name parameter with a 2 part structure; audit.report?
Explain the job statement in jcl?
Which dd parameters are required?
Name a few IBM utility programs, and explain its function.
How to compare two files in SYNCSORT and on the mismatch record should be deleted from second file.
When you specify multiple datasets in a JOBLIB or STEPLIB, what factor determines the order?
how do you access an uncataloged dataset in a jcl?
Must tape dataset definitions include vol=ser specifications?
For what purpose steplib and joblib are used ?
How can a stopped job be started again?
What are the 4 fields in dd statement?
Immediate Job opening for mainframe professionals in Keane Bangalore. Please find the below details: Organization: Keane India Location: Bangalore Skill: COBOL, JCL,VSAM,DB2,CICS,IMS,REXX,CLIST Exp: 1 to 4 years only Employment Type: Permenant Employee Note: If you have attended keane interview in past 6 months please ignore this job opening. Please respond to email id keanemfjob@gmail.com OR keanemfjob@yahoo.in with your latest resume and following details, We will contact you within 24 hours: Total IT Exp: Exp in Mainframe: Current CTC: Expected CTC: Notice Period: