View previous topic :: View next topic
|
Author |
Message |
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
What does STATEMENT stands for in the below sysprint of precompilation?
error msg:
Code: |
- BIND SQL ERROR
USING DB2ISDB AUTHORITY
PLAN=ZRS1055P
DBRM=ZRS1055
STATEMENT=353
SQLCODE=-206
SQLSTATE=42703
TOKENS=WS-ACTIVITY-DATE
CSECT NAME=DSNXORSO
RDS CODE=-100 |
Is it the line number of the statement that shows in precompilation output? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Quote: |
Is it the line number of the statement that shows in precompilation output? |
Did you try this out? |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
yes, I got this line number for declare cursor. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
I would be willing to bet it has something to do with WS-ACTIVITY-DATE!!!
Show us the declare for your cursor, please cut & paste so you get it correct. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
by the way,
something that you can store for future reference:
a -206 where a host variable is the TOKEN
and the host variable is indeed in the pre-compiler listing,
usually means that you forgot the : (colon)
also, you can find the sql in the dbrmlib.
i find that the pre-compiler listing is also included with the compiler listing
so accessing the sql in question is often faster by looking at the dbrm.
problem is, the statement no is in binary,
so i have a little rexx script (edit macro)
to find the sql.
VIEW the dbrmlib member and
dbrmln <statement number from BIND output)> (in your case dbrmln 353)
Code: |
MEMBER NAME DBRMLN
/* REXX */
ADDRESS ISREDIT
'MACRO (LINENO)'
HEX_LINE = D2X(LINENO,6)
x all
FIND "X'"HEX_LINE"'" FIRST
EXIT
|
now you know what the sql looks like and can easily find it in your source listing.
if your dbrm is in UTF,
you then have to:- remember the ispf line number of the dbrm (found with the dbrmln macro)
- browse the member
- use the DISPLAY command to convert the UTF to ebcidc
- LOCATE the ispf line number
|
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Thank you!! |
|
Back to top |
|
|
|