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
What is the local-storage section?
What is the difference between a binary search and a sequential search what are the pertinent cobol?
Mention the guidelines to write a structured cobol program?
Discuss about changing dataset name in proc.
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
how to refer the data field?
How do you differentiate between cobol and cobol-ii?
A table has two indexes defined. Which one will be used by the SEARCH?
What is the utilization of copybook in cobol?
How are the next sentence and continue different from each other?
how do you reference the esds vsam file formats from cobol programs
can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
What do you understand by psb and acb?