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



i have 1000 records in input file and i want to sort it and the first 200 records to be placed in ..

Answer / felix

i think, we can use OUTLIM parameter.

Is This Answer Correct ?    2 Yes 3 No

i have 1000 records in input file and i want to sort it and the first 200 records to be placed in ..

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

i have 1000 records in input file and i want to sort it and the first 200 records to be placed in ..

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

i have 1000 records in input file and i want to sort it and the first 200 records to be placed in ..

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

Post New Answer

More JCL Interview Questions

//ERFDS JOB //STEP1 //STEP2 //STEP3...COND=(4,LT) //STEP4 1.CONDITION IN STEP3 REFERS TO WHICH STEP'S RETURN CODE (STEP1 OR STEP2)? 2.IN ABOVE PROGRAM IF CONDITION SATISFIES IN STEP3 WHICH STEPS WILL EXECUTE?? AND WHY? IF CONDITION IN STEP3 SATISFIES

5 Answers   IBM,


How is a new GDG coded?

2 Answers  


how to do automated restart when a job abends?

0 Answers   IBM,


How do you create a temporary dataset?

0 Answers  


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??????????????

4 Answers   CTS,






In a proc i will concatinate 4 dd statements.i want to overide 3 dd statement through jcl how?

3 Answers  


What does the one advantange of using IEBUPDTE?????

2 Answers  


what is alternate index?

1 Answers  


Explain in DD statement what is the use of DCB parameter?

0 Answers  


i want to see the jobs in skeleton queue in diff region. (eg. 7 regions are running means , i want to see all the jobs in 7 regions which are in skel queue using 1 command)

1 Answers  


Using DELETE what type of file can you delete? a)SEQUENTIAL FILE B)INDEXED FILE C) D) Some options were there..i cant remember

3 Answers   HSBC,


Explain dfsort utility?

0 Answers  


Categories