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 / sanjay soni

Let me give it a try:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (FB/80)
//SORTOUT DD DSN=... output file (FB/80)
//SYSIN DD *
OPTION COPY
INREC BUILD=(1,80,SEQNUM,3,ZD)
INCLUDE COND=(81,03,NE,ZD,3)
OUTREC BUILD=(1,80)
/*

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is the record format of an output dataset specified?

735


which utility is used to run a cobol-db2 program?

796


What are the jcl procedures?

638


Can I send output of job to my remote device careerride123?

658


What is concatenating?

627






Explain the function of the dd dcb keyword?

689


What are the 4 fields in dd statement?

732


How can return codes be tested before execution of a job step?

912


How can values be passed from the job stream to an executable program?

864


What parameter of the job statement is used to limit the cpu time consumed by the job?

832


In sms datasets, what is the function of the dd avgrec keyword?

643


How do you submit a job for execution?

631


which utility is used a dummy utility?

778


Are there any set of rules for the names of the steps used in a job? What are they?

606


What is job control language?

603