i just need the first and last record from a sequencial
file?how
Answers were Sorted based on User's Feedback
Answer / 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 |
USE SKIP(N) To skip number of records
if 10 accounts are there and u want to skip first 7 records
use
//sysin dd*
repro infile(dd1) -
outfile(dd2) -
skip(07) -
count(03)
/*
for 1st and last
//sysin dd*
repro infile(dd1) -
outfile(dd2) -
count(1) -
skip(08) -
count(01)
/*
| Is This Answer Correct ? | 1 Yes | 4 No |
What is the difference between specifying DISP=OLD and DISP=SHR for a dataset?
How to send different PARM values based on the any condition to the program in a JCL? For example :- If the time is before 12:00 pm, I want to send "A" to some program and if it past 12:00 pm , I want to send "B" as a PARM value to that program. How to do it thur JCL only?
how many types of sorts are there in jcl?
what happens when time=0 is given in jcl code. what happens when blksize=0 is given in jcl code. what is symbolic and overriding parameters and a example program.
what is use of space parameter in dd statement?
ihave ten flatfile in that iwant to concatinate all the files except file 5,6 into output file by uing jcl? how to do this? give me detail yntax for tis?
in production region 100 steps are running,but i need to run only step5 without changing code how can i do it?
what is JCLLIB and PROCLIB in jcl and their syntax
How is the keyword DUMMY used in JCL?
Explain COND used in JCL?
What is the function of dd disp parameter?
what is use of dsn parameter in dd statement?