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 / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

I have a cobol db2 program(PGM A) where other program (PGM B) will call this program and passes some 50 fields data to PGM A. PGM A has some layout in which it receives the data from PGM B. And this layout has been copied in the linkage section pf PGM A. After getting the data, PGM A writes the data in a flat file in the same layout which it receives from PGM B. PGM B is a simple COBOL pgm. Please provide a JCL to run these programs.

1732


In job processing, what happens in execution stage?

698


what EXEC statement is and what is the syntax of EXEC statement used in JCL?

632


in ways data can be passed to a COBOL program from JCL?

669


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

1971






Give the syntax of job specifying jcl statement.

640


Is their any set of rules for dd? Explain.

664


What is multithreading in jcl?

941


The disp in the JCL is MOD and the program opens the file in OUTPUT mode. What happens ? The disp in the JCL is SHR and the pgm opens the file in EXTEND mode. What happens ?

947


Explain about LMFREE�free data set from its association with data ID

1006


What is notcat 2 - gs?

941


How to override loadlib?

1428


What are steplib and joblib? What for they are used?

695


What parameter directs the output of the job log dataset?

766


Does jcl support automatic restart?

761