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

what is use of space parameter in dd statement?

0 Answers   IBM,


Explain how can the submitting users racf authority be overridden in a job stream?

0 Answers  


Which COND paramter will u use to execute the step only if the previous step does not execute

3 Answers   BoA, HSBC,


Can we use two or more SYSPUNCH DD statements in a JCL for multiple unload (SYSREC00 & SYSREC01)..?

1 Answers  


how to purge 50 initiators continuously?? console commands??

4 Answers   IBM, ups,


Can I send output of job to my remote device careerride123?

0 Answers  


Explain the jcl exec statement?

0 Answers  


What is a MODEL Paramater in GDG ?

2 Answers   Xansa,


Is it possible to code instream data in a PROC?

0 Answers  


i have a string of 80 chars i want to replace 4th char with "a"?

3 Answers   CSC,


once we submitted the job to the operating system, how can we cancel the job before execution?

2 Answers  


Which dd parameters are required?

0 Answers  


Categories