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 Posted / 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 |
Post New Answer View All Answers
Explain the function of //jcllib statement?
what is the purpose of coding notify parameter in job statement?
what happens when COND is coded in JOB statement and when COND is coded inside EXEC statement?
What is the function of a dd statement?
What are the parameter we cannot use in procedure? How many instream we can write in single jcl?
How would you understand error(execution phase)?
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?
Why block size is multiple of lrecl in jcl?
What is the significance of addrspc parameter in exec statement?
how you can direct the data to spool using SYSOUT option?
How can the attributes of one sms dataset be copied to another dataset?
What are the jcl procedures?
what is the resolution for sb37 error
List the various advantages of using jcl language?
Where can program checkpoints be stored for use in a restart?