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 |
a dd statement has 2 types of parameters. Name them?
by using cond parameter maximum 8 cond can be coded in single cond means ?explain
In how ways you can pass the data from Jcl to cobol ?
Explain how can the disposition of sysout datasets be set for an entire jobstream?
I have multiple jobs ( JCLs with several JOB cards ) in a member. What happens if I submit it?
What is the difference between Sysin,Sysout,Sysdbout and Sysudump?
What is the meaning of the EXEC statement keyword, COND? What is its syntax?
i have records from 1 t0 100 . i need to open records from 10 to 18 and change the values in tht ? how can i do tht ?
when we use sysprint and sysout statements
Suppose I have 5 dataset listed under a single DD name in a catlogued PROC. How can I override one of those 5 dataset (say 3rd dataset)?
what is the control cards?
How do you access an uncatalogued dataset in a jcl?