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

Min no of member?s (PDS) in one directory block?

10 Answers  


can a job be submitted through jcl only? is there another way to submit a job?

2 Answers   CSC,


Describe the JOB statement, its meaning, syntax and significant keywords?

1 Answers  


Hi, all suppose i have 5 steps (S1,S2,S3,S4,S5) what will happen if cond is true or false (which of the other steps get executed)? 1) //s3 exec pgm=abc,cond=(0,le) 2) //s3 exec pgm=abc,cond=(0,le,step2) 3) In the jobcord RESTART=step3,cond=(0,le) 4) can i code COND=TRUE in jobcard, if yes what will happen?

3 Answers   TCS, Tech Mahindra,


how you will the direct the data to spool using sysout option?

0 Answers   IBM,


What is the function of a dd statement?

0 Answers  


jcl is like a complier....?

6 Answers  


Name some of the JCL statements that are not allowed in procs.?

1 Answers  


Describe the DD statement, its meaning, syntax and keywords?

2 Answers  


What is the function of dd name parameter with a 2 part structure; audit.report?

0 Answers  


What will happen if two JOB statements are mentioned in an JCL continuously.

2 Answers   IBM,


What is the meaning of data definition name (ddname) and dataset name (dsname) in the DD statement?

2 Answers  


Categories