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 compute verb? How is it used?
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
What is amode(24)?
) How do u handle errors in BMS macro
What is inspect in cobol ?
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
what is the use of outrecord?
Whats the difference between search & search ALL?
how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)
What is the difference between comp and comp-3 usage?
What rules are to be followed while using the corresponding options?
What is the difference between perform … with test after and perform … with test before?
What is the difference between binary search and sequential search?
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
Have you used comp and comp-3 in your project? And how?