MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

finding 'offending sql' in bind failure

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Fri Jan 11, 2008 11:09 am    Post subject: finding 'offending sql' in bind failure Reply with quote

Sometimes I do not have access to a pre-compile listing, which I could use to find the 'offending sql' in a bind error.

access to the dbrm and this rexx gives me the 'offending sql', which I can then find in the program - if necessary.


Code:

/* REXX */
/*       this rexx macro is member name:  DBRMLN
ADDRESS ISREDIT
'MACRO (LINENO)'
/*  TRACE ?R   */
HEX_LINE = D2X(LINENO,6)
FIND "X'"HEX_LINE"'"
EXIT


invocation example:
edit or view the appropriate dbrm and then:
DBRMLN 2768

2768 is the statement number from the 'failed bind' report.

the 'FIND' will point you to the sql in the dbrm. Though the sql in a dbrm is somewhat cryptic (will be moreso in vsn8 - unicode), you can figure out which sql in your program is the same.

hope this helps someone.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group