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

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?

1100


In job processing, what happens in conversion stage?

1146


Explain the function of //jcllib statement?

1154


Suppose I have five jobs to do. But I want to hold one?

1072


what is DSN parameter and DISP parameter is used for?

1099


What is NOTCAT ?

1273


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?

1058


I have a COBOL program that ACCEPTs some input data. How do you code the JCL statement for this?

1128


When output dataset space is required, what quantity categories are used?

1298


How can a stopped job be started again?

1138


Explain the purpose of dd * statement in jcl?

1011


How do you create a temporary dataset?

1114


How can values be passed from the job stream to an executable program?

1372


How does the jcl specify the job to os?

1095


How can an in-stream dataset be terminated?

1288