Staffan Tylen at IBM Mainframe Discussion List <IBM-MAIN@bama.ua.edu> wrote
on 02/13/2012 09:31:08 AM:
> I can't get my head around this one, I'm 100% sure the answer is
> starring at me but I just don't see it. I'm writing an assembler
> program that invokes SORT using LINK. There are E15 and E35 exits to
> handle records going in and out of the sort, but it keeps abending
> with S0C4 and sometimes S0C1, depending on whether the exit routines
> are half or fullword aligned
> ...

I think the problem may be that you don't have the top bit set on for the
exit addresses.
If you look in the DFSORT APG, you'll see that the exit addresses look like
this:

|f|Address of user exit E15|
|f|Address of user exit E35|

f (bit 0) has the following meaning:
0 = Enter the user exit with 24-bit addressing in effect (AMODE 24).
1 = Enter the user exit with 31-bit addressing in effect (AMODE 31).

I believe you want your exits to run in AMODE 31, not AMODE 24 so you need
f to be 1, not 0.

When I ran your program as is with DFSORT, I got S0C1.

When I changed it as follows to set the f flag on for each exit:

...
         OI    SORTE15,X'80'
         OI    SORTE35,X'80'
         LA    1,SORTPARM
         LINK  EP=SORT
...
SORTPARM DC    A(SORTSTMT)
SORTE15  DC    A(E15_EXIT)
SORTE35  DC    A(E35_EXIT)
         DC    F'-1'

I got a RC=16 as expected (since your E15 passes RC=16)

Try that and see if solves the problem.

Frank Yaeger - DFSORT Development Team (IBM) - yae...@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration

 => DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN

Reply via email to