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
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
Which Search verb is equivalent to PERFORM…VARYING?
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
Why occurs cannot be used in 01 level in COBOL?
How to use the same COBOL program in Batch and CICS on lines? explain with an example
Explain how you can characterize tables in cobol?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
What is a scope terminator give example?
Mention the guidelines to write a structured cobol program?
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
) what is the difference between AID and HANDLE AID?
How do you reference the following file formats from cobol programs?
How arrays can be defined in COBOL?
What is the use of intialize verb?
What are the different rules of SORT operation?