View previous topic :: View next topic
|
Author |
Message |
rahuindo
New User
Joined: 09 Apr 2008 Posts: 83 Location: Chennai
|
|
|
|
Hi,
I am facing a strange issue. I get a S0C4 abend sometimes (not regularly) when I execute my DB2 COBOL Stored Procedure. Please find the details below:
1. The SP takes XML as Input into a CLOB variable. The I/P parm for the field is as below:
Code: |
IN SP_IP_PARM CLOB(60000) CCSID EBCDIC FOR SBCS DATA
|
2. The following is the XML example received:
Code: |
<?xml version="1.0" encoding="UTF-8"?><UpdateList>
<UpdateRow>
<CRTTS>2014-09-05-15.28.30.000986</CRTTS>
<PRODNUM>123456</PRODCONTRACTNUM>
<RELNEWENDATE>0001-01-01</RELNEWENDATE>
</UpdateRow>
</UpdateList>
|
3. This is the CLOB variable definition to which the XML is moved internally:
Code: |
01 WS-SP-IP-CLOB USAGE IS SQL TYPE IS
XML AS CLOB(60000).
|
4. This is the statement to move the Input XML to WS-SP-IP-CLOB:
Code: |
MOVE SP-IP-PARM TO WS-SP-IP-CLOB
|
5. This is the DB2 statement which is been used to parse the XML:
Code: |
EXEC SQL
INSERT INTO SESSION.XML_VIEW
SELECT T.XMLCRTTS,
,T.XMLCNTRNUM
,T.XMLNEWENDATE
from XMLTABLE('$C/UpdateList/UpdateRow'
PASSING XMLPARSE(:WS-SP-IP-CLOB) AS "C"
COLUMNS
XMLCRTTS CHAR(26) PATH 'CRTTS',
XMLCNTRNUM CHAR(06) PATH 'PRODNUM',
XMLNEWENDATE CHAR(10) PATH 'RELNEWENDATE',
)
AS T
END-EXEC
|
Now, I don't receive abend frequently but sometimes. For the same input, the SP will be running fine. But then suddenly it will abend with S0C4 Reason 11.
This is the output from the SYSUDUMP:
Code: |
0COMPLETION CODE SYSTEM = 0C4 REASON CODE = 00000011
PSW AT ENTRY TO ABEND 078D1000 A0C7AA0A ILC 04 INTC 0011
0PSW LOAD MODULE ADDRESS = 20C73D30 OFFSET = 00006CDA
|
The Abend-Aid shows that the problem occurs at the following command:
Code: |
MOVE SP-IP-PARM TO WS-SP-IP-CLOB
|
Please let me know if something is wrong here? |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Can you tell us what do you have here, AMODE(?), RMODE(?)? |
|
Back to top |
|
|
rahuindo
New User
Joined: 09 Apr 2008 Posts: 83 Location: Chennai
|
|
|
|
Hi Rohit,
The AMODE is 31 and RMODE is ANY. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
Back to top |
|
|
rahuindo
New User
Joined: 09 Apr 2008 Posts: 83 Location: Chennai
|
|
|
|
Hi Rohit,
Though I am skeptical, I am still changing that because I am calling no other COBOL module from ym stored procedure. However, I do see that calls are being made some internal DB2 modules and hence maybe you're right. I will wait for 24 hours to see if there is any problem even after that. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Right, please let us know.
--Additionally what I also know.
Quote: |
A 24 bit program can call a 31 bit program with no problem.
A 31 bit program can call a 24 bit program, but will usually have problems.
If the called program is 24 bit, then compile the calling program with AMODE(24). |
Quote: |
Every program that runs in MVS/ESA is assigned two attributes,
an AMODE (addressing mode) and an RMODE (residency mode):
AMODE Specifies the addressing mode in which the program is
designed to receive control. Generally, the program is also designed to run
in that mode, although a program can switch modes and can have different
AMODE attributes for different entry points within a program module.
MVS/ESA uses a program's AMODE attribute to determine whether a
program invoked using ATTACH, LINK, or XCTL is to receive control in
24-bit or 31-bit addressing mode.
RMODE Indicates where the program can reside in virtual storage.
MVS/ESA uses the RMODE attribute to determine whether a program
must be loaded into virtual storage below 16 megabytes, or can reside
anywhere in virtual storage (above or below 16 megabytes). |
|
|
Back to top |
|
|
rahuindo
New User
Joined: 09 Apr 2008 Posts: 83 Location: Chennai
|
|
|
|
Hi,
It abended again. Here is the Compiler Options which I;ve:
Options in effect:
Code: |
NOADATA
ADV
QUOTE
ARITH(COMPAT)
AWO
NOBLOCK0
BUFSIZE(12288)
NOCICS
CODEPAGE(37)
NOCOMPILE(E)
NOCURRENCY
DATA(31)
NODATEPROC
NODBCS
NODECK
DIAGTRUNC
NODLL
NODUMP
NODYNAM
NOEXIT
NOEXPORTALL
FASTSRT
FLAG(I,I)
FLAGMIG4
NOFLAGSTD
INTDATE(ANSI)
LANGUAGE(EN)
LIB
LINECOUNT(60)
LIST
MAP
NOMDECK
NONAME
NSYMBOL(DBCS)
NONUMBER
NUMPROC(MIG)
OBJECT
NOOFFSET
OPTIMIZE(FULL)
OUTDD(UTSPRRU1)
PGMNAME(COMPAT)
RENT
RMODE(AUTO)
NOSEQUENCE
SIZE(4096000)
SOURCE
SPACE(1)
SQL('SQL(DB2),APOSTSQL')
SQLCCSID
NOSSRANGE
TERM
NOTEST
NOTHREAD
TRUNC(BIN)
NOVBREF
NOWORD
XMLPARSE(XMLSS)
XREF(FULL)
YEARWINDOW(1900)
ZWB
|
SQL Options in effect:
Code: |
APOSTSQL
ATTACH(TSO)
CCSID(37)
CONNECT(2)
DEC(31)
DECP(DSNHDECP)
NEWFUN(V10)
ONEPASS
PERIOD
STDSQL(NO)
SQL(DB2)
NOXREF
NO SOURCE
|
AMODE is 31. I am using DSNRLI for the RRSAF attachment. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Again, Did you verify above link Vs your current version and make the changes to the DATA(?) accodingly? |
|
Back to top |
|
|
|