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 / ananth

srot fields = copy

stopaft=6


next we have to give another step by using disp=(mod,delete,delete)

skiprec=7
stopaft=4

then 7th record gone remainging records into output file.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how do you access an uncataloged dataset in a jcl?

826


how to run batch program without jcl?

10059


What happens if both JOBLIB & STEPLIB is specified ?

604


Explain the function of dd name parameter with a 2 part structure; audit.report?

888


what happens when COND is coded in JOB statement and when COND is coded inside EXEC statement?

769






1) SORT FIELDS=(20,4,CH,D,10,3,CH,D) OUTREC FIELDS=(7:20,4,C' FUTURE ',20,2,10,3,1Z,1,9,13,7, 24,57,TRAN=LTOU,6X'FF') This example illustrates how a fixed-length input data set can be sorted and reformatted for output. The SORTIN LRECL is 80 bytes. The reformatted output records are fixed length with a record size of 103 bytes. SOLRF (the IBM-supplied default) is in effect, so unless the SORTOUT LRECL is specified or available, it will automatically be set to the reformatted record length of 103. in the above example i have some doubts that a) sort fields=(20,4,CH,D,10,3,CH,D) -what exactly it does and this fields related to output record fields or input record fields b)outrec used to refprmat the records after sorting that means could please reply me as soon as possible Thanks. Venkat

7073


How to alter the parameters for the existing gdg?

706


Explain the function of the dd dcb keyword?

694


a dd statement has 2 types of parameters. Name them?

635


What is the purpose of the dd keylen parameter?

716


What is condition checking in jcl? Is this possible?

619


How can an in-stream dataset be terminated?

843


what is the use of JCL?

658


How gdg are concatenated?

667


What is one line to pass PARM from JCL to COBOL?

479