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
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.
In job processing, what happens in execution stage?
what EXEC statement is and what is the syntax of EXEC statement used in JCL?
in ways data can be passed to a COBOL program from JCL?
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
Give the syntax of job specifying jcl statement.
Is their any set of rules for dd? Explain.
What is multithreading in jcl?
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 ?
Explain about LMFREE�free data set from its association with data ID
What is notcat 2 - gs?
How to override loadlib?
What are steplib and joblib? What for they are used?
What parameter directs the output of the job log dataset?
Does jcl support automatic restart?