How I sort the records in a file and copy the first 10
records to another file
Answers were Sorted based on User's Feedback
Answer / balasukumar
//SORTIN DD DSN=INF1
//SORTOT DD DSN=OTF
//SYSIN DD *
SORT FIELDS = COPY
SKIP=0
STOPAFT=10
/*
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / haleema
Keep first 10 sorted output records.
SUBSET FROM(IN1) TO(OUT1) OUTPUT KEEP FIRST(10)USING(CTL1)
//CTL1CNTL DD *
SORT FIELDS=(11,5,CH,A)
/*
Do this using ICETOOL job.
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / srinivasa yadav
//sysin dd *
sort fields=(starting postion,length,data-type,order)
skip rec=0
stop rec=10
/*
and also we can use file-aid tool. in file-aid
there is an option 3.3
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / girish kumar
just write like this
sysin dd *
sort fields=copy
stop after=10
/*
//
i tryed it's working
| Is This Answer Correct ? | 1 Yes | 1 No |
. What is the difference between the following statements : I) step#1 exec PGM=accpay ii) step#1 exec tbalance
How can a stopped job be started again?
What are some jcl statements that are not allowed in procedures?
At what stage, operator can change the class and priority of a submitted job?
wht is step lib n job lib ? where can we code joblib n steplib ?
In all our JOB Statement we have always COND=(4,LT) defined. Nevertheless when a Job failed the last step should then be executed (send a message to an user). Due to we don't like to change all our JOB's (ca. 2000), we are looking for a simply solution.
I need exexution process for JCL programs
I had 100 steps in jcl i want to execute first 10 steps only?
We have an output dataset in job with disp parameter as SHR. Can we write data in that file dataset?
Ques: How can we code COND parameter in a JCL so that only even steps (or only odd steps) get execute??
Explain about Specifying compiler options in the PROCESS (CBL) statement
what is the difference between return code and maxcc?