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
how do you code a null statement?
Matching Logic in Jcl not in cobol.Could any one please answer this question
What is the purpose of the dd keylen parameter?
Are there any set of rules for the names of the steps used in a job?
how to do automated restart when a job abends?
Explain the function of the dd dcb keyword?
For what purpose steplib and joblib are used ?
Explain how can a stopped job be started again?
Does jcl support automatic restart?
When The Define Jcl Is Not Available, How Can You Get Information About A Vsam File's Organisation ?
I have a cobol db2 program(PGM A) where other program (PGM B) will call this program and passes some 50 fields data to PGM A. PGM A has some layout in which it receives the data from PGM B. And this layout has been copied in the linkage section pf PGM A. After getting the data, PGM A writes the data in a flat file in the same layout which it receives from PGM B. PGM B is a simple COBOL pgm. Please provide a JCL to run these programs.
Explain the function of dd name parameter with a 2 part structure; audit.report?
How can a stopped job be started again?
What is the purpose of dd * statement in jcl?
State the uses of syspring, sysin, sort fields, sum fields and dummy.