While compiling this Stored Procedure, I did not see any warnings from Compiler.
This Stored Procedure calls another Stored Procedure and then reformats the output and generates XML and moves the XML to the CLOB variable SP-OUT-CLOB.
With the above layout, I face a 0C4 abend whenever I try to move any values to the O/P variables.
this is a sample code of where I face the abend:
MOVE ' ' TO SP-OP-INFO-MSG-TXT
MOVE 1 TO SP-OP-INFO-MSG-LTH
I can confirm that since I debugged using the Xpeditor.
However, the strange fact is that the Stored Procedure does not abend when I remove the following variables from the output parameters:
I looked at the Compiler warnings and I found this:
"SP-OP-INFO-MSG" or one of its subordinates was referenced, but
"SP-OP-INFO-MSG" was a "LINKAGE SECTION" item that did not have
addressability. This reference will not be resolved successfully at
This error implied that the SP-OP-INFO-MSG should also be referenced in the PROCEDURE division. I was not referencing this variable in the PROCEDURE division.