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
 
Find sql statement in dbrm that is bind failure

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

Global Moderator


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

PostPosted: Fri Jan 11, 2008 9:37 pm    Post subject: Find sql statement in dbrm that is 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.
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 Failure after DIR command Hank Watson All Other Mainframe Topics 2 Tue Aug 29, 2017 3:14 am
No new posts WER268A OUTREC STATEMENT : SYNTAX E... frozenblood87 SYNCSORT 12 Sat Aug 26, 2017 9:45 pm
No new posts Command to find TMEMBER name for a TPIPE Siva NKK Kothamasu IMS DB/DC 0 Wed Aug 16, 2017 6:08 pm
No new posts Suppress value reported by BREAK in D... Learncoholic DFSORT/ICETOOL 3 Wed Aug 16, 2017 6:03 pm
No new posts ON 2 AND EVERY 1 - Statement ??? UmeySan COBOL Programming 2 Tue Jul 25, 2017 1:20 pm

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