how to write a jcl prog to copy alternate recs from ps1 to
another ps2,suppose ps1 having 10 recs?

Answers were Sorted based on User's Feedback



how to write a jcl prog to copy alternate recs from ps1 to another ps2,suppose ps1 having 10 recs?..

Answer / 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

how to write a jcl prog to copy alternate recs from ps1 to another ps2,suppose ps1 having 10 recs?..

Answer / mahesh

//step1 exec pgm=iebgener
//sysut1 dd dsn=fss149.mahesh.ps1,disp=(shr)
//sysut2 dd dsn=fss149.mahesh.ps2,disp=shr

Is This Answer Correct ?    2 Yes 23 No

Post New Answer

More JCL Interview Questions

What is 'S0C7' abend?

9 Answers  


What is the use of ikjeft1b utility in jcl?

1 Answers  


how can handle the s0c4 abend???

3 Answers  


what is the general use of PARM? Give an explanation about the system defined parameters that could be passed through this PARM like XREF,LIST,LET,APOST,RENT etc..

3 Answers   Cognizant,


What are the utility programs in jcl?

0 Answers  






A dd statement consists of 4 fields. Name them?

0 Answers  


How would you understand error(execution phase)?

0 Answers  


List the different jcl statements that are not permitted in the procedures?

0 Answers  


How can the submitting users racf authority be overridden in a job stream?

0 Answers  


IN DFSORT sum fields=none is usec to remove duplicates.how to write the duplicates in another dataset?

2 Answers  


Explain about REXX

1 Answers  


Explain about SYSVAR

1 Answers  


Categories