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



COOL! 

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Thursday, November 30, 2006 11:16 AM
To: RPG programming on the AS400 / iSeries
Subject: RE: Doing a SET with variables

Using a test file, with lots of data in it, is always a good idea.  If
you shrink the test data down too much your test may not be valid.  For
example if I was testing the employee master file and deleted all the
records except my own, how would you have known that you had a problem
testing?

Another idea to consider is journalling and rollback:
CRTJRNRCV JRNRCV(ROB/MYJRN00001)
CRTJRN JRN(ROB/MYJRN) JRNRCV(MYJRN00001) STRJRNPF FILE(ROBDELX/DAVE)
JRN(ROB/MYJRN) IMAGES(*BOTH) ....+....1....+....2....+..
MYKEY                 MYAMT
A                      5.20
B                      9.30

update robdelx/dave
set myamt=6.1
2 rows updated in DAVE in ROBDELX.
Oops!  Forgot the Where clause
....+....1....+....2....+..
MYKEY                 MYAMT
A                      6.10
B                      6.10

RMVJRNCHG JRN(ROB/MYJRN) FILE((ROBDELX/DAVE)) TOJOBO(095563/ROB/ROBS1)
select * from robdelx/dave ....+....1....+....2....+..
MYKEY                 MYAMT
A                      5.20
B                      9.30

Journalling kicks a$$!

RMVJRNCHG is not limited to SQL.  Even the errant traditional RPG
program can be fixed.


Rob Berendt

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.