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 can a gdg base be created in a jcl. What is the difference between empty and scratch parameter while defining/altering gdg base?
What is the function of the dd mgmtclas keyword in sms datasets?
I had Records in file Like this Company Code IBM 2 IBM 1 IBM 4 WIPRO 3 WIPRO 2 WIPRO 9 TCS 4 TCS 6 TCS 3 i want the record of every company with highest code How can i do that?
when can a job time-out occur? How to overcome that?
How to read and write a single record into a file. I would like to use it to enter a single 8-character piece of information and use it to put it into a variable for processing in JCL. Thank you
Is it possible to define dd statements as you want?
How to run cobol program using jcl?
how can the same proc be re-used and called by many jobs?
I need exexution process for JCL programs
have in 100 records in a file i want to read first 3 records and skip next 3 records and agan i want to read 3 records and again i want to skip 3 records... run a loop from record one to 10 evaluate i/3 if comes even then skip else write to output file
How can return codes be tested before execution of a job step?
Give the syntax of job specifying jcl statement.
what are the various stages of job processing?
What is timing concept in mainframe?
What are steplib and joblib? What for they are used?