Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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?



Suppose your program is reading a Sequential Vsam file. The file contains 10 records. How will you..

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

Post New Answer

More JCL Interview Questions

What are the default system and catalog libraries in JCL?

2 Answers   Infosys,


how to convert fb to vb in jcl ?

5 Answers   IBM, Infosys,


How to release the Output HELD by using HOLD = YES on DD statement ?

2 Answers   IBM,


Give the syntax of job specifying jcl statement.

0 Answers  


What is a GDG? Why do we go for a GDG ? utility used to create GDG?

3 Answers   Xansa,


what is alternate index?

1 Answers  


Explain the jcl exec statement?

0 Answers  


what happens in execution stage in job processing?

0 Answers   IBM,


Which COND paramter will u use to execute the step only if the previous step does not execute

3 Answers   BoA, HSBC,


What all are the changes to be made in JCL so as to do testing?

2 Answers   TCS,


Can a temporary dataset be converted to permanent dataset and vice-versa in the middle of a job ?

4 Answers   IBM,


how can i use the parameters decalred in main pgm in sub pgm

2 Answers   TCS,


Categories