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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain dfsort utility?

675


I want to JCL sort for Non-COMP and COMP-3 fields SORT FIELDS=(1,5,A,6,11,A,12,11,A,19,1,A,20,1,A),FORMAT=BI,EQUALS Length of comp bytes is 11 bytes which start at 6byte and 12 byte considering 11 bytes in comp-3 is 6 bytes. Can anyone tell if the above sort work SORT FIELDS=(1,5,A,6,6,A,12,6,A,19,1,A,20,1,A),FORMAT=BI,EQUALS does not works OK

1487


What is the difference between the positional and keyword parameters? Give examples.

716


Explain how can a jobs execution priority be modified?

743


What is the function of //cntl statement?

832






what happens in execution stage in job processing?

657


Where & How Do You Code Identifier In Jcl?

699


How to compare two files in SYNCSORT and on the mismatch record should be deleted from second file.

5065


What is the job entry system used in your project? based on what criteria the sequence of jobs are picked if priority is not mentioned in the job card?

1811


by using cond parameter maximum 8 cond can be coded in single cond means ?explain

979


For what purpose steplib and joblib are used ?

690


What is the use of disp parameter?

653


Mainframes gets a text file that contains the name of the file. Now using JCL i want to locate that file name in the mainframe system and perform further processing. Please tell how to proceed

1975


what is the difference between JES3 and JES2?

683


What is use of restart and how to use it?

774