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
How to read and write a single record into a file. I would like to use it to enter a single 8-character piece of information and use it to put it into a variable for processing in JCL. Thank you
What are s0c1, s0c4, s0c5, s0c7 and socb?
Give the syntax of job specifying jcl statement.
I need exexution process for JCL programs
I have 60 steps in the JCL and want to Execute Only First from PROC by overriding in JCL ?
define cond parameter in jcl?
What is job control language?
What are the 2 types of parameters in dd statement?
Explain the function of dd name parameter with a 2 part structure; audit.report?
what is use of dsn parameter in dd statement?
What does a disposition of (new,catlg,keep) for a dsn mean?
Name the statement which can be used to send data to another mvs jes3 node?
What is the use of disp parameter?
What is the function of the dd mgmtclas keyword in sms datasets?
What does a disposition of (MOD,DELETE,DELETE) mean ?