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



Ops. Yes, I meant to say you need to compile at with commit(*none).

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Fred Horvat
Sent: Friday, June 13, 2008 12:51 PM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: Embedded SQL in RPG and Journaling Question

I changed COMMIT(*NONE) and now it worked the way I wanted it to.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Fred Horvat
Sent: Friday, June 13, 2008 1:20 PM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: Embedded SQL in RPG and Journaling Question

I checked and even recompiled and yes COMMIT(*CHG) was the compiler
default so I did not miss that.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Lim Hock-Chai
Sent: Friday, June 13, 2008 12:10 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: Embedded SQL in RPG and Journaling Question

You must have forgotten to compile with COMMIT(*CHG). The best solution
is to change the program to include this:

C/exec sql
C+ set option commit=*none
C/end-exec

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Fred Horvat
Sent: Friday, June 13, 2008 11:03 AM
To: RPG400-L@xxxxxxxxxxxx
Subject: Embedded SQL in RPG and Journaling Question

I have a monthly maintenance job that goes out to a file that our UPS
machines populate at the end of day with all the shipments via an ODBC
connection and purges records over 6 months old. The file is Journaled
and the program runs once a month. For about 2 years the program ran
fine. In December we upgraded our ERP package and as standard practice
we recompiled all our source members in out modification library to take
into account any file changes. During the ERP upgrade we added 3 more
fields to this file.
The program is an ILE RPG program with embedded SQL. It is rather
simple by comparing the transaction date to a date that is 180 days old
and deletes records older than that date.



Now when the program runs it will purge the records and then immediately
after the program ends Journaling reverses the changes. I did a
WRKACTJOB and can see the program run, then with Display File
Description I can see the number of records deleted increasing. When
the RPG program ends it immediately does a Journal Rollback. In
WRKACTJOB it says *ROLLBACK. After the job successfully ends there are
Zero deleted records and the original record count is the same.



What is causing this happen?



Fred Horvat

horvat@xxxxxxxx

216-426-5692



--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.





--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.





--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.