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 / sivakumar sekharannair

Kavya's answer is correct.
i used the following control card
//SYSIN DD *
SORT FIELDS=(1,3,CH,A),
STOPAFT=8

Input file contained the following records
IMSDEVELOPER CSAA
IMSPRODSUPPORTXEROX
IMSTESTER EMDAC
IMSDEVELOPER CSAA
CICPRODSUPPORTXEROX
IMSTESTER EMDAC

The output i got was

CICPRODSUPPORTXEROX
DB2PRODSUPPORTEMDAC
IMSDEVELOPER XEROX
IMSDEVELOPER CSAA
IMSDEVELOPER CSAA
IMSPRODSUPPORTXEROX
IMSTESTER EMDAC
IMSTESTER EMDAC

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the purpose of coding notify parameter in job statement?

688


what is the resolution for sb37 error

7716


How to run cobol program using jcl?

654


How can an in-stream dataset be terminated?

850


How to resolve the error "WER488A JOIN CAPACITY EXCEEDED" I am using SYNCSORT with JOINKEYS to compare 2 files. I am Getting error - > WER488A JOIN CAPACITY EXCEEDED There are 2 files to be compared with about 2 million records each. LRECL is 3665. Can somebody give a pointer as to how to resolve this problem? I am using SYNCSORT with JOINKEYS to compare 2 files. I am Getting error - > WER488A JOIN CAPACITY EXCEEDED There are 2 files to be compared with about 2 million records each. LRECL is 3665. Can somebody give a pointer as to how to resolve this problem?

7610






when can a job time-out occur? How to overcome that?

753


How jcl work to handle various input output file operations?

660


hello friends ,i have exam in Hsbc,pls any on send me placement papers and technical questions on mainframes,thank u

1670


What is use of restart and how to use it?

774


a dd statement has 2 types of parameters. Name them?

653


What is the difference between run mode and addressing mode?

638


What do you understand by the term “keyword” with respect to jcl and what is the opposite of the term?

681


how you can access an uncataloged dataset in a JCL?

656


Can we call instream to catalog and catalog to instream?

685


Where can program checkpoints be stored for use in a restart?

851