|
I think he's looking for a source scanning utility to find EXEC SQL--
commands that don't check SQLSTATE.
-----Original Message-----
From: Mark Waterbury [mailto:mark.s.waterbury@xxxxxxxxxxxxx]
Sent: Friday, June 21, 2019 9:47 AM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: check sqlrpgle code for missing SQLCOD SQLSTATE after a
sql operation
Gerald,
Here is one option that is already available:
For embedded SQL, there is the preprocessor directive:
EXEC SQL WHENEVER SQLERROR GO TO label;
So this gets processed by the SQL preprocessor at compile-time so that
any time an SQLCODE or SQLSTATE indicates an "error" situation, the
code will execute a GOTO to a label (TAG in RPG).
lf you want to then "turn off" this behavior for a following section
of code, you can use:
EXEC SQL WHENEVER SQLERROR CONTINUE;
to revert to the previous default behavior.
At least that's better than nothing?
Hope that helps,
Mark S. Waterbury
On Friday, June 21, 2019, 10:26:03 AM EDT, Gerald Magnuson <
gmagqcy.midrange@xxxxxxxxx> wrote:
I know we have places that don't check the sql code, sql state after
a SQL operation.
is there a tool, or method to find these problem areas?
I think I am asking for the impossible... but I want to ask just in case.
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit:
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.midrange.co
m_mailman_listinfo_rpg400-2Dl&d=DwICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v
5A_CdpgnVfiiMM&r=LifWsbmXTz4aXbMMEwOi1aJ3sWD5nsP_QI4reJ8MbDM&m=WzCBZws
ynPZOasMRoisUKa-2UkXV5rmrRwvmdtC_1Pg&s=bRVL9G6wVMS6z7_6oCMsd4CdcEigk5R
TCLJKdgOYdiQ&e= or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://urldefense.proofpoint.com/v2/url?u=https-3A__archive.midrange.com_rpg400-2Dl&d=DwICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=LifWsbmXTz4aXbMMEwOi1aJ3sWD5nsP_QI4reJ8MbDM&m=WzCBZwsynPZOasMRoisUKa-2UkXV5rmrRwvmdtC_1Pg&s=jAAzXrTYufFxIE7nxpfLM8UmYQsw_0XFq5j_cqsZREE&e=.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support
https://urldefense.proofpoint.com/v2/url?u=http-3A__midrange.com&d=DwI
CAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=LifWsbmXTz4aXbMMEw
Oi1aJ3sWD5nsP_QI4reJ8MbDM&m=WzCBZwsynPZOasMRoisUKa-2UkXV5rmrRwvmdtC_1P
g&s=Ce3HR0IM_OIlbFYW49E26IIjOVxmye4p5J9czgA8kDU&e= by shopping at
https://urldefense.proofpoint.com/v2/url?u=http-3A__amazon.com&d=DwICA
g&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=LifWsbmXTz4aXbMMEwOi
1aJ3sWD5nsP_QI4reJ8MbDM&m=WzCBZwsynPZOasMRoisUKa-2UkXV5rmrRwvmdtC_1Pg&
s=yCpH33wMCWW4fS2HEoU7nRSt2ukkP7epMJ5bB6CXHBw&e= with our affiliate
link:
https://urldefense.proofpoint.com/v2/url?u=https-3A__amazon.midrange.c
om&d=DwICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=LifWsbmXTz
4aXbMMEwOi1aJ3sWD5nsP_QI4reJ8MbDM&m=WzCBZwsynPZOasMRoisUKa-2UkXV5rmrRw
vmdtC_1Pg&s=bIlDIRdX2Ew_yDr9gxtEkwFiLH4gCwV5bAxZzqc87JU&e=
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit:
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.midrange.co
m_mailman_listinfo_rpg400-2Dl&d=DwICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v
5A_CdpgnVfiiMM&r=LifWsbmXTz4aXbMMEwOi1aJ3sWD5nsP_QI4reJ8MbDM&m=WzCBZws
ynPZOasMRoisUKa-2UkXV5rmrRwvmdtC_1Pg&s=bRVL9G6wVMS6z7_6oCMsd4CdcEigk5R
TCLJKdgOYdiQ&e= or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://urldefense.proofpoint.com/v2/url?u=https-3A__archive.midrange.com_rpg400-2Dl&d=DwICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=LifWsbmXTz4aXbMMEwOi1aJ3sWD5nsP_QI4reJ8MbDM&m=WzCBZwsynPZOasMRoisUKa-2UkXV5rmrRwvmdtC_1Pg&s=jAAzXrTYufFxIE7nxpfLM8UmYQsw_0XFq5j_cqsZREE&e=.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support
https://urldefense.proofpoint.com/v2/url?u=http-3A__midrange.com&d=DwI
CAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=LifWsbmXTz4aXbMMEw
Oi1aJ3sWD5nsP_QI4reJ8MbDM&m=WzCBZwsynPZOasMRoisUKa-2UkXV5rmrRwvmdtC_1P
g&s=Ce3HR0IM_OIlbFYW49E26IIjOVxmye4p5J9czgA8kDU&e= by shopping at
https://urldefense.proofpoint.com/v2/url?u=http-3A__amazon.com&d=DwICA
g&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=LifWsbmXTz4aXbMMEwOi
1aJ3sWD5nsP_QI4reJ8MbDM&m=WzCBZwsynPZOasMRoisUKa-2UkXV5rmrRwvmdtC_1Pg&
s=yCpH33wMCWW4fS2HEoU7nRSt2ukkP7epMJ5bB6CXHBw&e= with our affiliate
link:
https://urldefense.proofpoint.com/v2/url?u=https-3A__amazon.midrange.c
om&d=DwICAg&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=LifWsbmXTz
4aXbMMEwOi1aJ3sWD5nsP_QI4reJ8MbDM&m=WzCBZwsynPZOasMRoisUKa-2UkXV5rmrRw
vmdtC_1Pg&s=bIlDIRdX2Ew_yDr9gxtEkwFiLH4gCwV5bAxZzqc87JU&e=
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.