Logging user views to a record on the AS/400

620 pts.
Tags:
as/400 data
AS/400 user sessions
Is there a way on the As/400 to know every time a user accesses a specific record?  I need to know when a user even looks at a record.  I know I can use journaling to record changes to a record as well as adding and deleting records, but as far as I know, journaling will not record when a user just views a record.  I could also change the programs to record when users view a record in the application, but this would not record views via SQL and other tools outside the application.  Is it even possible to record data access at this level?



Software/Hardware used:
AS/400

Answer Wiki

Thanks. We'll let you know when a new response is added.

Defining a read trigger using ADDPFTRG should do the trick. The trigger will be called for every record read from the file and then the trigger can just log those reads to the record of interest.

Bruce Vining
<a href=”http://www.brucevining.com/”>Bruce Vining Services</a>
———————————————————————-

You cannot get it at the record level, but you can get it at the file level.
use OMTJRNE ( *NONE) on your STRJRNPF command.
That being said, if there are selective fields in the file that you do not want people to access, you can change the authority on th PF so they cannot get at it. Then create a LF with only selected fields from the file and authorize them to the LF.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Koohiisan
    You should be cautious with setting a 'read' trigger on the file, or at least that's what I read when I was researching the different types of triggers. From my research, the trigger would be called for every read...even those which are strictly programatic. So, if a program reads through every record in the file to do something, or if you run a query against the file, or an SQL statement...I believe you'd get a record written to your log file for each. Of course, I'm sure that you could read some info into the trigger program (or a program that the trigger submits for batch processing) that could determine if the read access was from an 'allowed' source, such as a certain program and just not inundate your log file with unwanted records. YMMV. This is purely from memory, and it was a couple of years ago when I dug into this. I did learn some helpful things about triggers and how they can be written to minimize their effect on your database speed. But...that's a topic for another question... ;)
    5,020 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following