IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Statement in Bind Error??


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Thu Jul 26, 2012 8:47 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Jul 26, 2012 8:59 pm
Reply with quote

Quote:
Is it the line number of the statement that shows in precompilation output?


Did you try this out?
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Thu Jul 26, 2012 9:06 pm
Reply with quote

yes, I got this line number for declare cursor.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Jul 26, 2012 9:16 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 26, 2012 9:18 pm
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Mon Jul 30, 2012 9:32 pm
Reply with quote

Thank you!!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Getting Error while trying to establi... DB2 3
Search our Forums:

Back to Top