i have 1000 records in input file and i want to sort it and
the first 200 records to be placed in output file. how to
do that??
Answers were Sorted based on User's Feedback
Answer / sudeep
I think the answer written by Kavya is not fully correct.It
will cause the sort to stop after first 200 records in the
input file are sorted.But we want the input file to be
sorted completely.and first 200 records to be placed in
output file.
Is This Answer Correct ? | 1 Yes | 2 No |
Answer / rajesh
//SYSIN DD *
SORT FIELDS=COPY,
OUTREC FILEDS=(1,2,CH,A) --> WHATEVER U WANNT TO SORT
STOPAFT=100
//
hope this does..
Is This Answer Correct ? | 0 Yes | 1 No |
Answer / bachee
//STEP1 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SORTOUT DD DSN=TEST.SAMPLE.OUTPUT.VIN,DISP=SHR
//SORTIN DD DSN=TEST.SAMPLE.INPUT.VIN,DISP=SHR
//SYSIN DD *
SORT FIELDS=( , ,CH,A)
ENDREC=200
//
Is This Answer Correct ? | 0 Yes | 5 No |
What is the significance of addrspc parameter in the exec statement?
Is there a way to check for an empty file in JCL other than using IEBCOMPR and the command PRINT COUNT(1)?
If a field is declared as a comp-3 field and if we want to sort a dataset based on this field, then how will the sort card be??? e.g- if we want to sort by a field which is defined as a PIC X(5) then we will mention - sort fields=(1,5,ch,a). Likewise if a field is defined as PIC S9(10)COMP-3 then in this case how will the sort field be defined (because in this case a sign is also involved)???
What is the difference between a PDS member and a GDG Generation ? Is it only this, that with a generation we can use +1, 0, -1 etc while with PDS member we can not ?
how to split a file
When output dataset space is required, what quantity categories are used?
after submiting the jcl.how do you know that the job has been completed.
What are some jcl statements that are not allowed in procedures?
Are all (i), (ii), (iii), (iv) of the below are VALID to reference a temporary dataset ? STEP2 DD1 DD DSN = &&TEMP STEP3 DD2 DD (i) DSN = TEMP (ii) DSN = *.TEMP (iii) DSN = *.STEP1.DD1 (iv) DSN = *.STEP1.DD1.ONE
Matching Logic in Jcl not in cobol.Could any one please answer this question
Can anyone tell me the syntax for printing two files at two different destinations in a single step?
What is TimeStamp, What is TimeStamp error and What is the Abend Code for TimeStamp Error ?