× 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 05-Nov-2014 06:54 -0600, Steve Richter wrote:
One way to do this is to write the procedure name to a field in the
file. That way it will be there in the data portion of the journal
entry.
To reliably do that we would need an RPG %procname() built
in function.

There is minimally, an API [retrieve program stack] to effect that. Triggers defined as *BEFORE the I\O could be defined to ensure that update to the field data occurs.

Does the system return the journal seqnbr somewhere? Where it would
be available to a trigger after exit program.

AFaIK the logging feature [journaling] is asynchronous to the database I/O, so the Sequence Number would be unknown; the I\O would have to institute a wait for the logging, or change to operate serially with the logging.

That way the trigger exit program could retrieve the procedure name
from the call stack and match it with the journal entry sequence
number and store the pair to a journal adjunct table.

The process performing the I\O is also asynchronous to the Receive Journal Entry (RCVJRNE) processing, so whatever is seen on the stack of the job identified by that particular log\journal entry by the Exit Program (EXITPGM) at the time the entry is received is ephemeral, and quite probably the stack is unrelated to that specific I\O; i.e. any view of the stack of the identified job is not [necessarily; except in very rare cases would not be] reflective of the I\O obtained as a logged sequence number within another process, and not even within the same process even using DELAY(*NEXTENT).


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.