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 default value(s) for an initialize? What keyword will allow for an override of the default?
What are the pertinent COBOL
What are all the divisions of a COBOL program?
Explain the configuration section of a cobol program with examples of syntax.
What is link edit in cobol?
how do you reference the rrds file formats from cobol programs
Write some characteristics of cobol as means of business language.
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?
How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?
What are the rules of the move verb?
What is the difference between next sentence and continue in cobol programing language?
What is the difference between Call and a Link?
For rewrite, why is it mandatory that file needs to be opened?
What is the difference between Global and External Variables?
How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that