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



You may want to look into making use of the client special registers added
at v6r1..
CLIENT_APPLNAME, CLIENT_PROGRAMID, CLIENT_USERID, CLIENT_WRKSTNNAME

Here's a article
https://www.itjungle.com/2009/03/18/fhg031809-story02/

Charles



On Thu, Aug 3, 2023 at 6:03 AM Brian Garland via MIDRANGE-L <
midrange-l@xxxxxxxxxxxxxxxxxx> wrote:

Thanks to all for the many suggestions. To answer a few questions that
came up and provide a bit more information.

This is an application that is mostly stored procedure calls through ODBC
using a common IBM i user profile. In each (most) of those stored
procedures, we write a change log. Information in the change log includes
real user, application, action, key info, changed column, old value, and
new value. This information is used to review changes as well as an undo
function in parts of our application.

We were considering using triggers to capture the changes instead of
manually writing the changes since it would also capture changes outside
our application and more easily capture "mass update" changes, i.e. an SQL
update that affects multiple rows. Since a trigger program would not have
much of the info we want to log we would need a way to pass that info in.
If something outside our application is making the change we would go off
call stack and job information to get what we can. Because the trigger
could be called multiple times across multiple files during one
"transaction" this extra information would have to be available for that
entire time.

To summarize the current suggestions:

- environment variables using setenv and getenv
- a service program with set and get procedures specific to this info
- add a unique id column to the original tables and use another table
with that unique id and the info
- a data area
- a data queue
- a user index

Brian

Original post:
I would like to be able to provide additional information that is not
available in the trigger buffer.
This additional information would be set by application programs and
used in the trigger program to create a log of changes for the application.
I have considered a table, a data area, and an SQL global variable.
Are there other options? Which option would provide the best
performance?

--
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or company to whom they are
addressed.
Do not disclose, distribute, or copy this email to others outside your
company. If you have received this email in error, please notify the
sender
immediately and delete this email from your system.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



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.