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

Explain dfsort utility?

1322


What is use of restart and how to use it?

1292


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?

1140


When you specify multiple datasets in a JOBLIB or STEPLIB, what factor determines the order?

1443


How do you access an uncatalogued dataset in a jcl?

1205


What is the function of job statement in jcl?

1076


what are the statements that are not valid to be included in an include statement?

1369


what happens when COND is coded in JOB statement and when COND is coded inside EXEC statement?

1277


How is a type of file defined in the jcl that executes the cobol program?

1176


Is automatic restart possible in jcl?

1187


Name the parameters which can be used to limit the number of records written to a sysout dataset?

1133


How does jcl specify the job to the operating system?

1225


how do you access an uncataloged dataset in a jcl?

1715


For what purpose steplib and joblib are used ?

1125


what is DD statement is used in JCL?

1176