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 //cntl statement?
Explain the function of job statement in jcl?
How can the disposition of sysout datasets be set for an entire jobstream?
How can values be passed from the job stream to an executable program?
What do you understand by the term notcat 2 – gs?
How can a jobs execution priority be modified?
Where & How Do You Code Identifier In Jcl?
I have a COBOL program that ACCEPTs some input data. How do you code the JCL statement for this?
Name a few IBM utility programs, and explain its function.
Explain the purpose of the dd keylen parameter?
What are the parameters that are used in creating a gdg?
What is the motivation behind coding class parameter in job statement?
Can anybody tell what is tool used to generate the list of PROCS used in JCL to generate a PROCTREE
what operation is performed by job statement?
What is the significance of addrspc parameter in exec statement?