Page 1 of 1

SORT verb in cobol

PostPosted: Mon Jul 14, 2008 8:09 pm
by abhimanyu
hi,
When using SORT verb in Cobol, should i give DD entry for the SORTWRK (in the statement below) file specified?

SORT SORTWRK ON ASCENDING KEY SORTWRK-EMPNO
USING SORTIN
GIVING SORTOUT

thanks
Abhi

Re: SORT verb in cobol

PostPosted: Mon Jul 14, 2008 11:46 pm
by dick scherrer
Hello,

First - do not code using/giving in the same program - this just wastes resources.

Look at your SELECT for the file named in the SD. Usually this will be someting like:
SELECT MY-SORT-FILE ASSIGN TO UT-S-SORTFILE.
The JCL i use has //SORTWK01 DD UNIT=. . .
SORTFILE is not in the JCL.