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 / felix

sorry. my previous answer is wrong.
use the following coding in JCL.
First u should sort the file using sort pgm. enter the
sorted file path in input data set.

//SYSIN DD*
REPRO
INDATASET(WRITE THE INPUT PATH)
OUTDATASET(WRITE THE OUTPUT PATH)
COUNT(200)

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain dd statement in jcl?

646


How to alter the parameters for the existing gdg?

716


What are some jcl statements that are not allowed in procedures?

730


what is use of dsn parameter in dd statement?

675


what are the statements that are not valid to be included in an include statement?

778






in a jcl, a large volume dataset is loaded to a table using bmcload in step1 and an image copy of the loaded table is taken using bmccopy in step2. Step2 abends because the image copy dataset cannot hold the volume of the table. How can this be rectified?

822


Does jcl support automatic restart?

763


Matching Logic in Jcl not in cobol.Could any one please answer this question

3675


//S10 EXEC PGM=ICETOOL //TOOLMSG DD SYSOUT=* //DFSMSG DD SYSOUT=* //CON DD DSN=VAR.INPUT1,DISP=SHR // DD DSN=VAR.INPUT2,DISP=SHR //OUT DD DSN=VAR.OUTPUT,DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(5,5)),UNIT=SYSDA //TOOLIN DD * * Splice the needed data from the two VB files together SPLICE FROM(CON) TO(OUT) ON(5,5,CH) WITHALL - WITH(12,5) WITH(22,20) VLENMAX /*

916


Are there any set of rules for the names of the steps used in a job?

639


How to pass the parameter in parm using linkage section ? (syntax)?

655


How can the attributes of one sms dataset be copied to another dataset?

861


How to find the UNIT and VOLUME of a (a) KEPT (b) UNCATALOGED and (c) CATALOGED dataset - using (i) JCL and using (ii) ISPF ?

2174


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

688


Explain how can the attributes of one sms dataset be copied to another dataset?

707