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



William



A journal actually works as a general low level trigger but the journal
only records an image of the row with some predefined status information
into the journal receiver.



The pros of journals are that you can do rollback and they are efficient if
you want to parallelize systems in a HA environment.



A trigger is a program that receives the row buffer before and after a
write/update/delete either before or after it is physically done to the
table.



You can attach up to 300 trigger programs to a single PF.



Since the trigger is a program you can do all sorts of things and business
logic in a trigger program and thereby it is a much more advanced function
than a journal.



One of the area’s triggers are very effective is when you integrate
systems. Let’s say you have standard system A and standard system B
installed. Both systems have a currency table but you only want to maintain
one that then should automatically maintain the other without program
changes. You just place a trigger on the PF you maintain and let the
trigger maintain the other. You can actually do it both ways, but then you
just have to go back in the program stack to test so a trigger doesn’t
trigger a trigger in an endless loop.



To monitor “who did what when” changes to tables triggers are in modern web
UI based systems the only way you can monitor these changes.



This has to do with the stateless web environment where a CRUD program
running under an Apache QZSRCGI program serves a random number of users
under a single common OS user profile. The OS simply doesn’t know the
actual web user that can be one of thousands.



This is not solely an IBM I issue, it exists on any platform.



And before some of the wise guys states that you just can change the
current user of the QZHBCGI program by letting Apache validate users
against OS security/profiles (which is correct) they simply doesn’t know
what implications this will cause. This is of course off topic so I will
not explain the implications in details just that this would potentially
slow down the web environment performance by 80-90 %.



The above is just examples of where triggers are much more efficient and
even the only way to solve given tasks without having to make large changes
in existing programs.


On Tue, Jan 7, 2014 at 6:17 AM, William Salim <william.salim@xxxxxxxxx>wrote:

Hi Guys,

at my place, journal is mandatory for the core process.
But what i did is not the core process that maintain internally.

If I can choose exclude my problem.. between trigger and journal.
I will choose journal for its value not the performance.


Journal VS Trigger
Cons :
- It will required extra spaces - true
- Might be slower than trigger

Pros :
- Spesific details on what happened to the file
- Can do the rollback if it is needed
- Required at my place for the Disaster Recovery process

In the future :
1. Spaces will have more cheaper and larger.
2. Performance, i bet i am sure. IBM will release new machine or OS that
will boost the performance

If in the process that i need the report that has to combine between fields
and the journal cannot do.
I will add the trigger on journal file.

the condition is relative, If the company has no problem with the money...





On Tue, Jan 7, 2014 at 6:05 AM, Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx
wrote:

So is Chuck's reference to something like Catch-22?

On 1/6/2014 4:18 PM, Jerry C. Adams wrote:
Vern,

It's clear that William has been given a directive vis-à-vis the date
of
a
record. It is clear that he has been told that *any* tool, method, or
incantation (PFM) that he could use to achieve said directive is
verboten.

Jerry C. Adams
IBM i Programmer/Analyst
It's okay if you disagree with me. I can't force you to be right.

--
This is the RPG programming on the IBM i (AS/400 and 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.




--
Regards,

William Salim
--
This is the RPG programming on the IBM i (AS/400 and 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.