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
in ways data can be passed to a COBOL program from JCL?
Explain how can an in-stream dataset be terminated?
how you will the direct the data to spool using sysout option?
What is the difference between run mode and addressing mode?
Is it possible to left uncode disp?
What is the use of symbol // in jcl?
hello friends ,i have exam in Hsbc,pls any on send me placement papers and technical questions on mainframes,thank u
How can the submitting users racf authority be overridden in a job stream?
What is the function of dd name parameter with a 2 part structure; audit.report?
What is the function of job statement in jcl?
Is automatic restart possible in jcl?
Is their any set of rules for dd? Explain.
What parameter of the job statement is used to limit the cpu time consumed by the job?
define cond parameter in jcl?
Mention the types of job control statements?