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 |
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.
I am getting the file from Unix to Mainframes for every 15 minutes. The mainframe job get abended with bad records coming from unix. I recovered that by deleting the bad data. I need permenant solution how to fix the issue? The record is getting characters in in first 9 positions which it should not. Please provide me the solution how to skip the records if it finds the charcters in the first 9 positions. K
Why do you want to specify the REGION parameter in a JCL step?
Is acct parameter mandatory?
What are three major types of JCL statements? What are their functions?
what is a steplib
In my job I have 6 steps. Step01,02,03...step06. after executing step02 i want to skip step03 and want to execute step04. and once step04 is done then I want to go back and execute step03. once step03 is completed I want execute step05, 06 and so on... can any one tell me how do i do that???
how can we pass external data to instream procedures
5 Answers IBM, Infosys, Ocwen,
how to edit a tape dataset ? asked in wipro
What does a disposition of (new,catlg,keep) for a dsn mean?
What does SYSIN * indicate?
I have four steps in jcl they are STEP1,STEP2,STEP3 and STEP4. Can it possible to run the reverse order like step4 first then step3,step2,step1?