Suppose i have a file with 10 recs and i want to skip only the
7 th record and copy the rest into another file. How do i do
it using SORT?
Answer Posted / manoj
This can be done using two SORTs in a JCL.
1. In the first SORT, sort the file and create two output
files.
File 1: Containing records from 1 to 7
File 2: Containing records 9 & 10
//SYSIN DD*
SORT FIELDS=COPY
OUTFIL FILES=01,ENDREC=07
OUTFIL FILES=02,STARTREC=09,ENDREC=10
/*
2. Use another SORT statement and then merge the two
statements created above.
| Is This Answer Correct ? | 13 Yes | 5 No |
Post New Answer View All Answers
Explain the function of dd disp parameter?
Can we call instream to catalog and catalog to instream?
i want to store 20 digits . how will u do it in cobol ?
Explain how can an in-stream dataset be terminated?
What parameter directs the output of the job log dataset?
what are the various stages of job processing?
Explain the job statement in jcl?
is there any way to execute more than one proc in the same exec statement at the same time..?
Name the parameters which can be used to limit the number of records written to a sysout dataset?
Explain how can the submitting users racf authority be overridden in a job stream?
In job processing, what happens in conversion stage?
what is use of dsn parameter in dd statement?
How to submit a jcl from cics?
a dd statement has 2 types of parameters. Name them?
How to find the UNIT and VOLUME of a (a) KEPT (b) UNCATALOGED and (c) CATALOGED dataset - using (i) JCL and using (ii) ISPF ?