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
What do you understand by jcl?
What is the syntax of JCL statement?
For what purpose steplib and joblib are used ?
what is DSN in JCL and what are the parameters to declare the DSN?
What is the purpose of dd dummy statement?
how JCL works?
a set statement is used to define commonly used symbolic across job steps or procedures. It initializes the previous values in the symbolic names. It has to be defined before the first use of the symbolic names in the jcl. State whether true or false?
Describe the various parameters utilized in the creation of a gdg?
Is acct parameter mandatory?
I want my job (careerride) to be executed in 1 minute and 2 seconds. How do I do that?
How would you understand error(execution phase)?
what is the JCL statement consists of?
what are the types of abends that occur on job failure? And explain the possible causes of these
Explain the jcl exec statement?
write a jcl to execute a job by 7:00 am on jan 20,1986?