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 search and searchall?what is the diffrence between them?give an best example?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
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?
What is the Purpose of Pointer in the string?
How do you get the data to code the BMS macro?
What kind of error is trapped by on size error option?
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
Write the code implementing the perform … varying.
how to refer the data field?
Name the divisions, which are available in a cobol program?
What type of SDLC u followed? Why?
How you can characterize tables in cobol?
In COBOL, what is the different between index and subscript?
how to convert the recors form vsam file to db2 table tru file aid