Adding Time, Date, and User into Maintenance Applications for Auditing Purposes

 

When you utilize maintenance applications for your end users, you will, more likely than not, want to record when and who have made changes to your data. Doing this with mrc is a breeze.

After you have selected the appropriate files and fields and have set up your sequencing, click on the "Application Options" -> "Field Settings" link.

In the field description box, clear out the text and insert *ADDDATE to have your application automatically insert a timestamp when the record is submitted. If your application will be updating (rather than adding) you can utilize the *CHGDATE feature instead. The same method can be used for acquiring the time (*ADDTIME or *CHGTIME).

You also have the ability to capture the User (if you are utilizing mrc Security). To capture the user, simply enter *ADDUSER in the Field Description. The field must be an alpha field.

Note: If you wish to have the date inserted as 'YMD', you will need to add the *ADDDATE to an 8,0 field or a 10 True Date field.

Note: To update & add audit features simultaneously, please use this syntax: *MDF (in place of *ADD)

Also, please be advised that *MDFDATE, *MDFUSER, *MDFTIME, and *MDFPGM will still print the fields within the update maintenance screen, so consider hiding these rows within m-Painter.

Created: February 29, 2008 | Modified: June 12, 2017