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
what is DSN parameter and DISP parameter is used for?
When space is allocated for an output dataset, what units can be used?
Does jcl support automatic restart?
Brief description of inline procedure of jcl.
What do you understand by the term notcat 2 – gs?
What is the function of job statement in jcl?
When you specify multiple datasets in a JOBLIB or STEPLIB, what factor determines the order?
how do you create a dataset in a jcl with the same file organisation as that of another existing dataset?
Is condition checking possible in jcl? If yes, how?
Explain the hierarchy levels in jcl?
Must tape dataset definitions include vol=ser specifications?
I have many files which i am receiving from client everyday. I have one step for every file to check for empty or not. Here client gives 30 files i need to check for every file for empty or not and i need to perform 30 steps. Can I do it in single step. Dynamically i need to change the File name in my step.
Can I share my data with other jobs? How?
what is JCL?
what operation is performed by job statement?