× 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.



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.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.