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 / shubham_a
I am giving it a try, please correct me if anything is wrong
//JOBNAME JOB `ACCINFO`,MSGCLASS=X
//STEP001 EXEC PGM=DFSORT
//SORTOUT DD DSN=ABC.DEF.GHI
// DISP=(,CTLG)
//SORTIN DD DSN=ABC.EXAMPLE.INFILE,DISP=SHR
//SORTOUT DD DSN=ABC.EXAMPLE.OUTFILE,DISP=(,CATLG,DELETE)
//SORTOF01 DD DSN=ABC.EXAMPLE.OUTFILE,DISP=SHR
//SORTOF02 DD DSN=ABC.EXAMPLE.OUTFILE,DISP=SHR
// DCB=*.SORTIN,SPACE=*.SORTIN
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=01,STOPAFT=06
OUTFIL FILES=02,SKIPREC=07,STOPAFT=10
/*
//SYSOUT DD SYSOUT=* =COPY
//
Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
Is there any command to check wether the ps file is in sorted order?
Explain how can the submitting users racf authority be overridden in a job stream?
What is Cataloged Procedures?
Can we use DISP=SHR in output file in JCL
How to alter the parameters for the existing gdg?
What are the difference between jcl and jes?
how you will the direct the data to spool using sysout option?
What are the jcl procedures?
what is the resolution for sb37 error
Why block size is multiple of lrecl in jcl?
what JCL Procedures?
How do you access an uncatalogued dataset in a jcl?
i want to store 20 digits . how will u do it in cobol ?
Explain about ISPF/TSO Commands
If a (+1) generation dataset is created in the first step of a job, how can it be referenced in later steps of the same job for input?