How do I change the date format on a PSAudit security report?
VigilEnt Security Agent for iSeries 7.5
VigilEnt Security Agent for PSAudit 7.5
System Auditing and Reporting (SAR)Â
Dates for transactions on PSAudit security reports are in the wrong format.
The date format on the report header cannot be changed, but you can change the date format of transactions (records).
To change the date format of the transactionsÂ on aÂ PSAudit security report:
- Save the PSAudit/SAR (System Auditing and Reporting) query objects by typing the following commands on the iSeries command line, pressing Enter after each:
CRTSAVFÂ QGPL/SARQRYOBJB TEXT('save PSAudit/SAR *QRYDFN objects before change')
SAVOBJÂ OBJ(*ALL)Â LIB(PSAUDIT)Â DEV(*SAVF)Â OBJTYPE(*QRYDFN) SAVF(QGPL/SARQRYOBJB)
- Type the following command and press Enter to create the QTEMP files referenced by the queries:
Alternatively, you can run the report interactively to create the QTEMP file used by the query you want to change.
WRKQRYand press Enter.
- Select option 2 (=Change), andÂ then specify the query name, such as AAQYPW.
- Ensure the library name is PSAUDIT.
- Press Enter.
- Select Define result fields, and then press Enter.
- Redefine the date format as appropriate. If the query definition has not been modified by the end user, the date format is printed as YY/MM/DD. The year starts in byte 1, the month in byte 3, and the day in byte 5 of the transaction date field respective to the particular query definition.Â To redefine aÂ date result field from MM/DD/YYÂ to YY/MM/DD format, change the values in the Expression column from the following:
substr(pwdate, 3, 2) || '/' || substr(pwdate, 5, 2) || '/' || substr(pwdate, 1, 2)
to the following:
substr(pwdate, 1, 2) || '/' || substr(pwdate, 3, 2) || '/' || substr(pwdate, 5, 2)
- Press Enter.
- Press F3.
Yfor Save definition and
3for Run option, and then press Enter.
Save any changed queries you want to keep since they will be replaced by any future agent upgrades.