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 |
Explain the job statement in jcl?
What is the difference between catalogue procedure and In-Stream procedure?
how would you create a temporary dataset? And where will you use them?
Suppose I have five jobs to do. But I want to hold one?
How can return codes be tested before execution of a job step?
describe the job statement, its meaning,syntax and significant keywords?
Is there a way to check for an empty file in JCL other than using IEBCOMPR and the command PRINT COUNT(1)?
Explain about LMMLIST�list a library's members
a job have 5 steps and it will executes a proc which have 5steps in it. now i have to execute step3 only when step2 of proc executes successfully
How can you execute a COBOL program via SYSIN in JCL?
how to write a jcl prog to copy alternate recs from ps1 to another ps2,suppose ps1 having 10 recs?
wht happens if blksize = 0 and lrec = 0 ?