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
I had Records in file Like this Company Code IBM 2 IBM 1 IBM 4 WIPRO 3 WIPRO 2 WIPRO 9 TCS 4 TCS 6 TCS 3 i want the record of every company with highest code How can i do that?
I want to join to input files and write the matching fields on to an output file but i dont want the output file a sorted one
Can I send output of job to my remote device careerride123?
A dd statement consists of 4 fields. Name them?
What is the maximum length of a single line of jcl?
What is the difference between run mode and addressing mode?
Is automatic restart possible in jcl? If yes, how?
We can use PASS with permanent datasets also. THEN Which is the condition in which we may use PASS (instead of KEEP) with permanent data sets, while there is no need to specify UNIT and VOL for them like temporary data sets (in cas we use KEEP for permanent data sets) ?
What is the use of disp parameter?
In sms datasets, what is the function of the dd mgmtclas keyword?
What is the job entry system used in your project? based on what criteria the sequence of jobs are picked if priority is not mentioned in the job card?
In job processing, what happens in conversion stage?
When output dataset space is required, what quantity categories are used?
What are the utility programs in jcl?
What statement marks the beginning of a job step; assigns a name to the step; identifies the program or catalogued or in-stream procedure to be executed in the step?