×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Thanks for you help.
Jon Marasco
OfficeMax
Sr. Software Engineer
630-864-5101
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of CRPence
Sent: Monday, July 29, 2013 4:18 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: RUNSQLSTM with commit(*ALL)
On 29 Jul 2013 13:24, Marasco, Jon wrote:
I have a PF file that is currently journalled. My application will
generate the SQL insert statements to add X number of records into
PF. These SQL statements will be in a source file. I was thinking
of using RUNSQLSTM with the keyword COMMIT(*ALL) to apply the inserts
(referencing the source file of inserts statements), but if any of
the inserts fail, I would like all the successful inserts to be
ROLLBACKED. Is this possible? I did research on the web. But could
not find any references to ROLLBACK with regard to COMMIT(*ALL).
Any commit [isolation] level other than *NONE [*NC] will effect an
implicit ROLLBACK when a statement in the script exceeds the specified
ERRLVL (Error Level); i.e. need not be *ALL. The last statement in the
script can be a COMMIT, and that request to commit will not run if any
prior statement exceeded the error level. Per the help text on the
ERRLVL parameter: "If errors that are greater than the value specified
for this parameter occur during processing, no more statements are
processed and the statements are rolled back if they are running under
commitment control." The COMMIT CL command instead could be issued
after the RUNSQLSTM completes, but the error level plays the same role;
in either case, an error level that is excessively permissive could
allow some transactions to be committed even though some prior /failed/
requests had transpired.
As an Amazon Associate we earn from qualifying purchases.