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 / madhu
We can achieve the same easily by using ICETOOL.
//STEP001 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=SORT.TEST,DISP=SHR
//SORTOUT DD DSN=SORT.TEST.OUTPUT,DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(500,500),RLSE)
//TOOLIN DD *
SUBSET FROM(SORTIN) TO(SORTOUT) INPUT REMOVE RRN(4) RRN(6)
/*
//
Explanation:
SORTIN refer input file with 10 records
SORTOUT is the new file created by excluding 4th and 6th records.
SUBSET,INPUT and REMOVE are defined ones in ICETOOL.
RRN is used to refer the required record .
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Name what parameter directs the output of the job log dataset?
What is multithreading in jcl?
A dd statement consists of 4 fields. Name them?
how can a gdg base be created in a jcl. What is the difference between empty and scratch parameter while defining/altering gdg base?
I have a COBOL program that ACCEPTs some input data. How do you code the JCL statement for this?
Is automatic restart possible in jcl? If yes, how?
How to execute 2nd and 4th steps among 5 steps in jcl proc?
what is use of space parameter in dd statement?
What statement can be used to send data to another mvs jes3 node?
by using cond parameter maximum 8 cond can be coded in single cond means ?explain
How can the submitting users racf authority be overridden in a job stream?
What is the difference between the positional and keyword parameters? Give examples.
Explain the purpose of dd * statement in jcl?
How to pass data to a program that is coded in an exec statement?
Brief description of inline procedure of jcl.