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 are the 2 types of parameters in dd statement?

642


How can unused space allocation be returned to the system when a dataset is closed?

806


When The Define Jcl Is Not Available, How Can You Get Information About A Vsam File's Organisation ?

741


What does it mean by Restart and Checkpoint in JCL ? How are checkpoints being taken and what is their usage ? How to use Checkpoint macro on a JOBSTEP ?

9211


Where & How Do You Code Identifier In Jcl?

695






Is their any set of rules for dd? Explain.

657


What is multithreading in jcl?

938


How do you overcome this limitation ?

693


What is the purpose of dd?

724


if we want to use a gdg which is already created by some job, then how to use the reference of the last generation in a jcl?

1613


Explain about ISPF/TSO Commands

1308


How jcl work to handle various input output file operations?

656


What does a disposition of (new,catlg,keep) for a dsn mean?

609


what is “Cond= even” and “Cond=only”?

737


I have a job called careerride and some steps in it as step1,step2. But I want to execute step2 before step1 ? How do I do that?

825