How do you define a sort file in JCL that runs the COBOL
program?
Answer Posted / shinoy sansilavose
Suppose if you want to sort a file TEST.OUTPUT.FILE which
is the output of your COBOL program then you can do the
following coding in JCL,
//SORTIN DD DSN=TEST.OUTPUT.FILE,DISP=SHR
//SORTOUT DD DSN=TEST.OUTPUT.SORT.FILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=TESTDA,
// SPACE=(CYL,(50,50)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
//SYSIN DD *
SORT FIELDS=(1,5,CH,A)
Now the sorted file TEST.OUTPUT.SORT.FILE will be sorted
based on the field starting from 1 to 5 specified in the
input for SORT.
| Is This Answer Correct ? | 30 Yes | 7 No |
Post New Answer View All Answers
how do you reference the rrds file formats from cobol programs
IF I mention stop run in CICS what happens?
How can you get the ksds file records into your cobol program?
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
how to refer the data field?
What are all the divisions of a COBOL program?
What is cobol?
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
) how do u code after getting data?
Explain how to differentiate call by context by comparing it to other calls?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.
how do you reference the variable block file formats from cobol programs
i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this
What is redefines clause in COBOL?