ca.portal.admin

Re:Re: Debugging database procedures

Discussion created by ca.portal.admin on Mar 29, 2007
Kay,

I assume you know that when issuing DC commands in SYSTEM mode
registers are automatically saved by IDMS you have to tell it
what to save. You can only save R2 to R8 as R9 and R10 must
never change R11 is always saved R0 and R1 are used by the call
so cannot be saved and R14 is always from address and R15 to address.
Here is an example

#WTL MSGID=BSMSG,
MSGPREF='BS',
MSGDICT=NO,
PARMS=(BSMTEXT),
OVRIDES=MSGBOTH,
PLIST=STK2PLST,
RGSV=(R2-R8)

What I do is have 'debugging areas' in the procedure and at
various points in the code I store registers and or variables
into one of the debugging areas. So I may have 10 separate
areas and would to a stores at 10 points in the code.
I then use PMDC are similar product to display the load module
in memory and form the debugging bits I can normally see what
it has gone wrong and figure out my logic errors. This of
course is only works if only you are calling the procedure.

I always find it much harder debugging them when do not abend.
With an abend you have a dump so you can see what is wrong. It
is when they do
not do what you expect and no abend it is tricky.

Hope this helps

Pete

Outcomes