Suppose your program is reading a Sequential Vsam file. The
file contains 10 records. How will you code the JCL to read
only 2nd, 5th, 7th,and 10th record?
Answer / mahesh
Hope this will work
//SORTIN DD DSN=INPUTFILE,DISP=SHR
//SORTOF01 DD DSN=X.Y.OUTFILE1,DISP=SHR
//SORTOF02 DD DSN=X.Y.OUTFILE2,DISP=SHR
//SORTOF03 DD DSN=X.Y.OUTFILE3,DISP=SHR
//SORTOF04 DD DSN=X.Y.OUTFILE4,DISP=SHR
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=01,STARTREC=2,ENDREC=2
OUTFIL FILES=02,STARTREC=5,ENDREC=5
OUTFIL FILES=03,STARTREC=7,ENDREC=7
OUTFIL FILES=04,STARTREC=10,ENDREC=10
/*
//STEP2 EXEC PGM=SORT
//SORTIN DD DSN=X.Y.OUTFILE1,DISP=SHR
// DD DSN=X.Y.OUTFILE2,DISP=SHR
// DD DSN=X.Y.OUTFILE3,DISP=SHR
// DD DSN=X.Y.OUTFILE4,DISP=SHR
//SORTOUT DD DSN=X.Y.OUTFILE,DISP=SHR
//SYSIN DD *
SORT FIELDS=COPY
/*
Use X.Y.OUTFILE as input to your program , but in real time
it wont make sense
| Is This Answer Correct ? | 6 Yes | 2 No |
What are the default system and catalog libraries in JCL?
how to convert fb to vb in jcl ?
How to release the Output HELD by using HOLD = YES on DD statement ?
Give the syntax of job specifying jcl statement.
What is a GDG? Why do we go for a GDG ? utility used to create GDG?
what is alternate index?
Explain the jcl exec statement?
what happens in execution stage in job processing?
Which COND paramter will u use to execute the step only if the previous step does not execute
What all are the changes to be made in JCL so as to do testing?
Can a temporary dataset be converted to permanent dataset and vice-versa in the middle of a job ?
how can i use the parameters decalred in main pgm in sub pgm