|
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://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
--
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://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
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.