SORT CAPACITY EXCEEDED AND ZERO RETURN CODE



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

SORT CAPACITY EXCEEDED AND ZERO RETURN CODE

Postby Ron Mascarenhas » Mon Jun 29, 2009 2:51 am

We have recently migrated to DFSORT and having a problem when a DFSORT file in a COBOL program runs out of space with
the message SORT CAPACITY EXCEEDED. The problem is that the program always end with a zero return code. The SORT-RETURN also returns a zero code. Is there any way for the DFSORT to return a non-zero code or issue an abend when an out-of-space error occurs during sort?
Ron Mascarenhas
 
Posts: 15
Joined: Mon Nov 03, 2008 2:04 am
Has thanked: 0 time
Been thanked: 0 time

Re: SORT CAPACITY EXCEEDED AND ZERO RETURN CODE

Postby dick scherrer » Mon Jun 29, 2009 4:45 am

Hello,

Please post all of the diagnostic info along with the message ids.

I have not yet seen an internal sort that failed and still had zero in SORT-RETURN. This is a cobol internal sort?
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

Re: SORT CAPACITY EXCEEDED AND ZERO RETURN CODE

Postby Ron Mascarenhas » Mon Jun 29, 2009 1:10 pm

Yes, this is an internal COBOL SORT. I did some additional tests with the program and found that the SORT-RETURN is 16 when it is tested AFTER the SORT verb. However the program was testing the SORT-RETURN after each RELEASE/RETURN statement and expecting any errors to be trapped.

Which errors are trapped when the SORT-RETURN is tested after the RETURN/RELEASE?
Ron Mascarenhas
 
Posts: 15
Joined: Mon Nov 03, 2008 2:04 am
Has thanked: 0 time
Been thanked: 0 time

Re: SORT CAPACITY EXCEEDED AND ZERO RETURN CODE

Postby Frank Yaeger » Mon Jun 29, 2009 8:44 pm

SORT-RETURN after the SORT verb contains the condition code passed back from DFSORT.

I don't believe that SORT-RETURN after RETURN/RELEASE is meaningful. SORT-RETURN is the value in register 15. I believe COBOL uses DFSORT exits associated with RETURN/RELEASE. I don't know what RETURN/RELEASE corresponds to in the COBOL program exactly or how it corresponds to the flow with the DFSORT exits, but I suspect that register 15 = SORT-RETURN at that point has nothing to do with DFSORT failing with an ICE046A message.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: SORT CAPACITY EXCEEDED AND ZERO RETURN CODE

Postby dick scherrer » Tue Jun 30, 2009 2:29 am

Hello,

SORT-RETURN should be tested (immediately - imho) after the SORT statement. There is no reason to test SORT-RETURN after release/return statements.

You can also set SORT-RETURN to 16 if you want to stop processing the SORT statement before all records are processed. If you set SORT-RETURN to 16, the SORT is terminated on the next input or output operation.
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 DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post