SORT verb in cobol



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

SORT verb in cobol

Postby abhimanyu » Mon Jul 14, 2008 8:09 pm

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
abhimanyu
 
Posts: 1
Joined: Mon Jul 14, 2008 7:55 pm
Has thanked: 0 time
Been thanked: 0 time

Re: SORT verb in cobol

Postby dick scherrer » Mon Jul 14, 2008 11:46 pm

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post