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 :( To eliminate other
possible causes I created the following very simple program where the E15 exit
returns RC=16 to tell SORT just to terminate without doing anything. But it
also abends in the same way. The PSW seems to point at an unrelated ISPF module
in the LPA, but I haven't investigated that further. This is the code:
TEST60 CSECT
TEST60 AMODE 31
TEST60 RMODE ANY
SAVE (14,12)
LR 12,15
USING TEST60,12
LA 11,SAVEAREA
ST 11,8(,13)
ST 13,4(,11)
LR 13,11
LA 1,SORTPARM
LINK EP=SORT
L 13,4(,13)
ST 15,16(,13)
LM 14,12,12(13)
BR 14
DS 0F
SAVEAREA DS 18F
SORTPARM DC A(SORTSTMT)
DC A(E15_EXIT)
DC A(E35_EXIT)
DC F'-1'
SORTSTMT DC AL2(SORTEND-SORT)
SORT DC C' SORT FIELDS=(1,1,CH,A)'
DC C' RECORD TYPE=F,LENGTH=80'
SORTEND EQU *
E15_EXIT DS 0F
LA 15,16 Terminate SORT
BR 14
E35_EXIT DS 0F
LA 15,8
BR 14
END TEST60
It can't be more simple than this, like any piece of "Hello World" code. I've
tried linkedit as either RENT or NORENT, same result. The sort program produces
diagnostic messages on SYSOUT as expected, so it gets called OK. So, who is the
first to spot the obvious flaw that I can't see? Thanks for helping out.
Staffan
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN