Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Statement in Bind Error??

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1825
Location: NY,USA

PostPosted: Thu Jul 26, 2012 8:47 pm    Post subject: Statement in Bind Error??
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Thu Jul 26, 2012 8:59 pm    Post subject: Re: Statement in Bind Error??
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

Senior Member


Joined: 21 Sep 2010
Posts: 1825
Location: NY,USA

PostPosted: Thu Jul 26, 2012 9:06 pm    Post subject:
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    Post subject:
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: 6970
Location: porcelain throne

PostPosted: Thu Jul 26, 2012 9:18 pm    Post subject:
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

Senior Member


Joined: 21 Sep 2010
Posts: 1825
Location: NY,USA

PostPosted: Mon Jul 30, 2012 9:32 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts -502 Error - Cursor already open anand jeyapaul DB2 7 Sun Oct 29, 2017 4:22 am
No new posts COBOL - EXIT statement weird behavior anthony.pangestu COBOL Programming 0 Fri Oct 27, 2017 9:57 am
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us