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...

i just need the first and last record from a sequencial
file?how

Answer Posted / paray2x

The best option is to used File-Aid processing options.

If not,

1. Use SORT FIELDS=COPY, STOPAFT=1 to get the first record.

2. Insert line numbers in the file using SEQNUM fucntion of
SORT. Then, do a SORT FIELDS on this line number in
descending order, save it a temp file.
3. Use SORT FIELDS=COPY, STOPAFT=1 on this temp file to get
the last record.

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What statement marks the beginning of a job step; assigns a name to the step; identifies the program or catalogued or in-stream procedure to be executed in the step?

1103


Explain how can an in-stream dataset be terminated?

1327


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

2635


How jcl is used for testing batch programs?

1285


What is the function of the dd mgmtclas keyword in sms datasets?

1238


how you will the direct the data to spool using sysout option?

2434


What is the purpose of dd?

1242


A dd statement consists of 4 fields. Name them?

1422


what EXEC statement is and what is the syntax of EXEC statement used in JCL?

1170


What is the format of comment statement?

1224


What does a disposition of (MOD,DELETE,DELETE) mean ?

1135


Explain the function of dd disp parameter?

1124


What is the job entry system used in your project? based on what criteria the sequence of jobs are picked if priority is not mentioned in the job card?

2290


I have a cobol db2 program(PGM A) where other program (PGM B) will call this program and passes some 50 fields data to PGM A. PGM A has some layout in which it receives the data from PGM B. And this layout has been copied in the linkage section pf PGM A. After getting the data, PGM A writes the data in a flat file in the same layout which it receives from PGM B. PGM B is a simple COBOL pgm. Please provide a JCL to run these programs.

2361


What happens if both JOBLIB & STEPLIB is specified ?

1149