Joined: 20 Oct 2006
Location: porcelain throne
|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.
/* REXX */
/* this rexx macro is member name: DBRMLN
/* TRACE ?R */
HEX_LINE = D2X(LINENO,6)
edit or view the appropriate dbrm and then:
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.