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
What is the function of dd disp parameter?
How jcl work to handle various input output file operations?
What is one line to pass PARM from JCL to COBOL?
What is the function of the steplib dd statement?
what is the use of JCL?
How does jcl specify the job to the operating system?
Explain how can return codes be tested before execution of a job step?
What is job control language?
which parameter is used to check the syntax of a jcl without executing it?
How would you understand error(execution phase)?
what is use of space parameter in dd statement?
Explain how can values be passed from the job stream to an executable program?
What does a disposition of (MOD,DELETE,DELETE) mean ?
I have mainpgm(abc) this is the only cobol pgm(non-db2).And this pgm calling subpgm name "acd" this also only cobol(non- Db)and this pgm calling some other subpgm this pgm has cobol-db2 pgm. 1) IF you calling static mode how to run and how to compile? 2) IF you calling dynamic mode how to run and how to compile? plz suggestion me.
how you will the direct the data to spool using sysout option?