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?

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


Please Help Members By Posting Answers For Below Questions

What statement can be used to send data to another mvs jes3 node?

1650


is there any way to execute more than one proc in the same exec statement at the same time..?

2641


Name what parameter directs the output of the job log dataset?

1057


How to override a dsn that is contained in a proc called by another proc? I need to do the override in the calling jcl?

1165


Explain about LMFREE�free data set from its association with data ID

1637


How to compare two files in SYNCSORT and on the mismatch record should be deleted from second file.

5544


Mainframes gets a text file that contains the name of the file. Now using JCL i want to locate that file name in the mainframe system and perform further processing. Please tell how to proceed

2565


What is the function of dd disp parameter?

1140


Is it possible to left uncode disp?

1212


which parameter is used to check the syntax of a jcl without executing it?

1363


How do you submit a job for execution?

1115


why should SYSIN DD * statement should not be included inside a PROCedure snippet??? please answer this.. i need to know.

2459


How to read and write a single record into a file. I would like to use it to enter a single 8-character piece of information and use it to put it into a variable for processing in JCL. Thank you

1076


What does it mean by Restart and Checkpoint in JCL ? How are checkpoints being taken and what is their usage ? How to use Checkpoint macro on a JOBSTEP ?

9755


How to code these statements in JCL: CLEANUP INITIAL(NO) RESTART(NO) DYNALLOC(NO) job definition..?

2260