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
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?
In job processing, what happens in conversion stage?
Explain the function of //jcllib statement?
Suppose I have five jobs to do. But I want to hold one?
what is DSN parameter and DISP parameter is used for?
What is NOTCAT ?
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?
I have a COBOL program that ACCEPTs some input data. How do you code the JCL statement for this?
When output dataset space is required, what quantity categories are used?
How can a stopped job be started again?
Explain the purpose of dd * statement in jcl?
How do you create a temporary dataset?
How can values be passed from the job stream to an executable program?
How does the jcl specify the job to os?
How can an in-stream dataset be terminated?