sql code -904



IBM's flagship relational database management system

sql code -904

Postby zhanjiajie » Thu Feb 16, 2012 7:32 am

when i use cedf statement in cicst to debug my cics program which is related is db2, there is a error

TRANSACTION: IHH2 PROGRAM: IHH2PROG TASK: 0001450 APPLID: CICST DISPLAY: 00
STATUS: COMMAND EXECUTION COMPLETE
CALL TO RESOURCE MANAGER DSNCSQL
EXEC SQL OPEN P.AUTH=WISCOH2 , S.AUTH=
PLAN=IHH2PROG, DBRM=IHH2PROG, STMT=00509, SECT=00001
SQL COMMUNICATION AREA:
SQLCABC = 136 AT X'0F908680'
SQLCODE = -904 AT X'0F908684'
SQLERRML = 026 AT X'0F908688'
SQLERRMC = '00E7009A,100,TEMP DATABASE' AT X'0F90868A'
SQLERRP = 'DSNXISCR' AT X'0F9086D0'
SQLERRD(1-6) = +1, 000, 00000, -1, 00000, 000 AT X'0F9086D8'
SQLWARN(0-A) = '_ _ _ _ _ _ _ _ _ _ _' AT X'0F9086F0'
SQLSTATE = 57011 AT X'0F9086FB'


OFFSET:X'002CF4' LINE:UNKNOWN EIBFN=X'1802'

and the opened cursor has been rolled back(or perhaps never be opened)
so systems displayed this:

STATUS: COMMAND EXECUTION COMPLETE
CALL TO RESOURCE MANAGER DSNCSQL
EXEC SQL (NOT KNOWN) P.AUTH=WISCOH2 , S.AUTH=
PLAN=IHH2PROG, DBRM=IHH2PROG, STMT=00302, SECT=00001
SQL COMMUNICATION AREA:
SQLCABC = 136 AT X'0F908680'
SQLCODE = -501 AT X'0F908684'
SQLERRML = 000 AT X'0F908688'
SQLERRMC = '' AT X'0F90868A'
SQLERRP = 'DSNXERT' AT X'0F9086D0'
SQLERRD(1-6) = -240, 000, 00000, -1, 00000, 000 AT X'0F9086D8'
SQLWARN(0-A) = '_ _ _ _ _ _ _ _ _ _ _' AT X'0F9086F0'
SQLSTATE = 24501 AT X'0F9086FB'
OVAR 001: TYPE=DECIMAL, LEN=05.00, IND=000 AT X'0F908709'
+ DATA=X'004040'
OFFSET:X'002278' LINE:UNKNOWN EIBFN=X'1802'

how can i solve this problem? is there something wrong with the embeded statement of declare cursor in cobol like this:
EXEC SQL
DECLARE CSR-ATHSJNL SENSITIVE STATIC SCROLL CURSOR
WITH HOLD FOR
SELECT TRXCODE,AMOUNT2,AMOUNT3,WORKDATE,WORKTIME
FROM WISCOH2.ATHSJNL
WHERE DAYS(WORKDATE) >= DAYS(:H-START)
AND DAYS(WORKDATE) <= DAYS(:H-END)
AND MEDTYPE = :ATHSJNL-MEDTYPE
AND CARDNO = :ATHSJNL-CARDNO
AND ACCNO = :ATHSJNL-ACCNO
END-EXEC
zhanjiajie
 
Posts: 4
Joined: Thu Feb 16, 2012 7:21 am
Has thanked: 0 time
Been thanked: 0 time

Re: sql code -904

 

Re: sql code -904

Postby steve-myers » Thu Feb 16, 2012 8:09 am

Do not make the same request in more than one place.
steve-myers
Global moderator
 
Posts: 1885
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: sql code -904

Postby zhanjiajie » Thu Feb 16, 2012 8:28 am

ok, i know.
i made that because i don't know whether i made it in the right part of this forum~= =
zhanjiajie
 
Posts: 4
Joined: Thu Feb 16, 2012 7:21 am
Has thanked: 0 time
Been thanked: 0 time

Re: sql code -904

Postby sensuixel » Fri Mar 02, 2012 1:28 pm

You need to read the description of the reason code you get '00E7009A' along with the -904 SQLCODE

http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=%2Fcom.ibm.db2z9.doc.codes%2Fsrc%2Ftpc%2F00e7009a.htm

;)
sensuixel
 
Posts: 58
Joined: Mon Feb 21, 2011 8:55 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post