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 |
How to pass the parameter in parm using linkage section ? (syntax)?
What are hierarchy levels in jcl?
What is 'S0C7' abend?
how to resolve the soc4 error?
What do you understand by the term notcat 2 – gs?
Suppose I have Five Steps in PROC In this Case I want to Execute third Step in PROC using Main JCL don't use any COND Explain with Coding Thanks & Regards SHREE
Suppose I have 5 dataset listed under a single DD name in a catlogued PROC. How can I override one of those 5 dataset (say 3rd dataset)?
How do you submit JCL via a Cobol program?
What are the kinds of job control statements?
i have a jcl in which 4 & 5 step creates a new generation. 4th step output is as input for the 6th step & 5th step output is used as input in the 7th step. How they are refered as in the 6th & 7th steps? If the job abends in 6th step then how the 5th step output is refered in 7th step?
Many jcl statements contain specific values designed to direct and control the execution of the statement. What are these fields called?
wht is the d/f between positional parameter n keyword parameter ?