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
Why block size is multiple of lrecl in jcl?
if the submitter of a job wants to inform another user about the job completion, how can it be done?
whats the diff bw the evaluate also and and?
Explain the jcl exec statement?
What is the purpose of dd?
Are there any set of rules for the names of the steps used in a job? What are they?
I have a job called careerride and some steps in it as step1,step2. But I want to execute step2 before step1 ? How do I do that?
Explain the purpose of dd * statement in jcl?
What are hierarchy levels in jcl?
what is DD statement is used in JCL?
I want my job (careerride) to be executed in 1 minute and 2 seconds. How do I do that?
What is the purpose of dd dummy statement?
which utility is used a dummy utility?
In job processing, what happens in conversion stage?
How can unused space allocation be returned to the system when a dataset is closed?