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

Can we call instream to catalog and catalog to instream?

685


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

802


Explain the purpose of dd * statement in jcl?

643


Which dd parameters are required?

697


what is the difference between JES3 and JES2?

684






Explain the function of dd name parameter with a 2 part structure; audit.report?

906


Does jcl support automatic restart?

764


how would you create a temporary dataset? And where will you use them?

772


Name a few IBM utility programs, and explain its function.

4441


define cond parameter in jcl?

779


Explain the function of dd disp parameter?

599


whats the diff bw the evaluate also and and?

1859


what is the purpose of coding notify parameter in job statement?

688


hello friends ,i have exam in Hsbc,pls any on send me placement papers and technical questions on mainframes,thank u

1670


Is there any command to check wether the ps file is in sorted order?

2437