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
List the different components of jcl statement?
Suppose I have a program in cobol name ”careerride” and want to execute the program by jcl. Specify the process?
A chkpt is the parameter coded for multi-volume qsam datasets in a dd statement. When a chkpt is coded as chkpt=eov, a checkpoint is written to the dataset specified in the sysckeov statement at the end of each volume of the input/output multi-volume dataset. State whether true or false?
how can you check if a file is empty using jcl?
what are JCLLIB and STEPLIB in JCL?
What are the utility programs in jcl?
how do you create a dataset in a jcl with the same file organisation as that of another existing dataset?
What is the difference between run mode and addressing mode?
Explain about ISPF/TSO Commands
what is the use of JCL?
How can values be passed from the job stream to an executable program?
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?
I HAVE A VB BLOCK WHICH IS USED AS INPUT IN COBOL CONATINING SOME RECORDS CAN I CHANGE THE FILE FROM VB TO FB?
State the uses of syspring, sysin, sort fields, sum fields and dummy.
Is acct parameter mandatory?