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

What are the difference between jcl and jes?

1146


how would you create a temporary dataset? And where will you use them?

854


What is catelog procedure and how many catelog procedure to use in one job?

7721


what is use of space parameter in dd statement?

853


what is “Cond= even” and “Cond=only”?

848






Is it possible to left uncode disp? If yes, how?

787


Explain how can a jobs execution priority be modified?

836


How to resolve the error "WER488A JOIN CAPACITY EXCEEDED" I am using SYNCSORT with JOINKEYS to compare 2 files. I am Getting error - > WER488A JOIN CAPACITY EXCEEDED There are 2 files to be compared with about 2 million records each. LRECL is 3665. Can somebody give a pointer as to how to resolve this problem? I am using SYNCSORT with JOINKEYS to compare 2 files. I am Getting error - > WER488A JOIN CAPACITY EXCEEDED There are 2 files to be compared with about 2 million records each. LRECL is 3665. Can somebody give a pointer as to how to resolve this problem?

7823


What is job control language?

705


Explain about LMFREE�free data set from its association with data ID

1117


what is DSN in JCL and what are the parameters to declare the DSN?

823


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?

706


I need exexution process for JCL programs

1935


What is multithreading in jcl?

1040


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.

2092