Problem solve Get help with specific problems with your technologies, process and projects.

Auditing commands used by a UserID

This tip shows you how to audit a UserID for all the commands that were executed by calling a program.

You can audit a UserID for all the commands that were executed by calling a program.

Step 1  
Change the user's ID, which needs to be audited by using the command. 

   USER Profile -- give the profile

All the commands used by that user will be logged into the journal receivers of the system security Journal QAUDJRN.

Step 2

When you want to retrieve the information you have to call the command. 

  Journal - QAUDJRN
  Library - QSYS
  Starting journal receiver - *CURCHAIN
  Starting Date - date you want 
  Starting time - time you want
  Ending Date - date you want 
  End time - time you want
  User Profile - enter user ID
  Output- can be to a outfile or display

Note if an outfile is used than specify the outfile format depending on the information required, for this specify TYPE4. 

In the outfile the last column will show the commands used. 

You can properly format this output also 

MOST IMPORTANT  -- The journal receiver attached to QAUDJRN journal should be available on the system for the date and time specified on the system, then the *CURCHAIN value will jog through all the earlier attached journal receivers to QAUDJRN and get the data.

If there is no data it will give an error -- FROM and TO values not valid. 

You can track select commands instead of tracking all the commands. 

Dig Deeper on RPG iSeries programming

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.