i have 10,000 records in one input file.i want to sort 1 to
5000 records in one outputfile and remaining records sort in
another output file write the syntax for this?
Answer Posted / muttaiah
@Albert:
IF we are using Outfil, we won't use Skiprec & stopaft.
My Answer:
Step1:
sort fields=copy
outfil files=01,endrec=5000
outfil files=02,startrec=5001,endrec=10000
Step2:
Sort fields=(pos,leng,cha,a or d)
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
how you can direct the data to spool using SYSOUT option?
How to alter the parameters for the existing gdg?
What are steplib and joblib? What for they are used?
what is the use of JCL?
What is the function of dd name parameter with a 2 part structure; audit.report?
how to do automated restart when a job abends?
How can return codes be tested before execution of a job step?
Explain how can values be passed from the job stream to an executable program?
How to override loadlib?
I want to JCL sort for Non-COMP and COMP-3 fields SORT FIELDS=(1,5,A,6,11,A,12,11,A,19,1,A,20,1,A),FORMAT=BI,EQUALS Length of comp bytes is 11 bytes which start at 6byte and 12 byte considering 11 bytes in comp-3 is 6 bytes. Can anyone tell if the above sort work SORT FIELDS=(1,5,A,6,6,A,12,6,A,19,1,A,20,1,A),FORMAT=BI,EQUALS does not works OK
if we want to use a gdg which is already created by some job, then how to use the reference of the last generation in a jcl?
have in 100 records in a file i want to read first 3 records and skip next 3 records and agan i want to read 3 records and again i want to skip 3 records... run a loop from record one to 10 evaluate i/3 if comes even then skip else write to output file
What does a disposition of (new,catlg,keep) for a dsn mean?
Can an individual step be restricted from using all the jobs allowed cpu time?
in order to execute step2 a job after a return code of 8 in step1, what condition you will code in step2?