Can you post sample code?

On Fri, Oct 14, 2011 at 6:43 PM, Charles Mills <charl...@mcn.org> wrote:
> I have spent the past two days on a bug in my assembler code that is driving
> me crazy.
>
> I have an assembler routine that is called from C++ code and in turn calls
> COBOL test code. It works most of the time so there is apparently no LE
> linkage problem. Basically all it does is read a QSAM file and pass the
> records to the COBOL program in a tight loop.
>
> If I parametize the C++ code such that it only calls it for file 'A' it
> works. If I parametize the C++ code such that it only calls it for file 'B'
> it works. If I parametize the C++ code to call it for 'A' and then 'B' it
> works -- except that if I intentionally (I'm testing here) set things up
> such that there is an I/O error and it to goes through its SYNAD logic on
> file 'A' then when I call it for file 'B' it makes it all the way through
> the file (I log the 529 records in the COBOL program) and back around in the
> loop to the GET. (I do a BALR R9,0 before and after the GET so I can tell in
> the dump whether I last entered or exited the GET.) But I never get to my
> EOF routine. Instead I S0C4 on some random storage -- I have branched to a
> work area off R13 that in fact is never used. The first line of code at the
> EOF address is a WTO and it never gets hit (and I know from the other tests
> that it works). I have checked the WTO in the dump and it has not been
> corrupted. The GET macro expansion has not been clobbered in storage. The
> first word of the DCB points to the DCBE (clean 24-bit address) and the
> eleventh word of the DCBE points to my EOF routine (31-bit address). The
> EODAD address in the DCB is 000001. I added debug code such that I know that
> my SYNAD and DCB ABEND code is not being driven. There is an EXLST but it
> looks correct -- has only the correct OPEN ABEND and exit routines and codes
> (05 and 91).
>
> In other words I have a loop that reads all 529 records of a file, issues
> another GET, and ends up in the weeds rather than in the EOF routine. The
> DCB correctly points to the DCBE which correctly points to the EOF address,
> and SYNAD and ABEND are not getting driven. What the heck else should I be
> looking for?
>
> DCB is MACRF=(GM),ERROPT=ACC if that makes any difference.
>
> Charles Mills
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to