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
Name what parameter directs the output of the job log dataset?
What is the purpose of dd * statement in jcl?
When you specify multiple datasets in a JOBLIB or STEPLIB, what factor determines the order?
Is condition checking possible in jcl? If yes, how?
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
How jcl is used for testing batch programs?
How to alter the parameters for the existing gdg?
What is NOTCAT ?
Suppose I have a program in cobol name ”careerride” and want to execute the program by jcl. Specify the process?
Explain the hierarchy levels in jcl?
What is the function of the dd dcb keyword?
Hello Guys, I have 1+ Year Experience in MAINFRAME TESTING. After 1 Week I have an Interview With a Company on Mainframe Testing. Please Could You Guys Please Suggest me What Sections Should I prepare ?? ___Tell Me the Topic Or Appropriate Site & Links. ?? ---------------Thank You
What are steplib and joblib?
How can the submitting users racf authority be overridden in a job stream?
What statement marks the beginning of a job step; assigns a name to the step; identifies the program or catalogued or in-stream procedure to be executed in the step?