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 purpose of the dd keylen parameter?
Can we call instream to catalog and catalog to instream?
What are the rules employed while naming the steps in a job?
i have 10 steps in jcl program but i have to exicute only 2,4,6,8th and 10th ?how it's possible?
What is model dataset label(Model DSCB)?
Brief description of inline procedure of jcl.
how to run JCL thru COBOL.
How many types we can give input to JCL
If a JOBSTEP abends, AND without using COND also, all the subsequent steps execute, then what is the use of using EVEN ? Why do we use EVEN when without it also all the JOBSTEPs execute ?
What is jcl in mainframe?
How I sort the records in a file and copy the first 10 records to another file
Is condition checking possible in jcl? If yes, how?