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 max blocksize for a Tape file?
what is A-MODE and R-MODE?
Can we use COND=EVEN on a job card, when jobs are scheduled through scheduler?
There is a procedure in A.B.PROCS(PROC1) (member name is PROC1) //PROCA... There is a call to a procedure PROCA from a JOB. //STEP01 EXEC PROCA ... Here "PROCA" in JOB refers to the actual PROC name or the member name of the PDS where this PROCA is stored.
what is alternate index?
I have a file in which I have 20 records. I want my first record to go into file 1 and second record to go in second file. I want to copy the alternate records like this in the two output files. How can I do this using JCL?
Suppose I have seven jobs to do, but I want to hold one than how can I do this?
How is a new GDG coded?
I have a input file. Data like: ABCDEFGH.... i want out put file like AB BC CD DE....How can do this??
Ques: How can we code COND parameter in a JCL so that only even steps (or only odd steps) get execute??
I have three files for one step i need to override the third file how to do that in jcl?
I have one GDG. Everyday One new version is being created.Now I want to split this created version in different files each having 1000 records. Here Problem is I don't know How many records will be there in new version of GDG? that's why I don't know How many Out files we need to use . Interesting??????????????