iseriesuniversity

Tuesday, February 20, 2007

This is to create a simple reporting tool for system administrator.

The requirement is, the profile should posses a *AUDIT authority as expected for any AS/400 system administrator. There should exist a data area, called DATTIM in your library or any library and please replace the library name 'Subbu' with yours.

And RTVDSKINF, should have been completed. It is very much recommended that this, command is submitted in batch mode, hence it does not eat up the system resources.

The CL program produces few spool files.

And here it is. The program is not very great, but can act as basic starting point for futher improvements.

*************** Beginning of data ***************************************************************************************
0001.00 PGM 070220
0002.00 DCL VAR(&TIME) TYPE(*CHAR) LEN(7) 070220
0003.00 DCL VAR(&DATE) TYPE(*CHAR) LEN(6) 070220
0004.00 DCL VAR(&TIME2) TYPE(*CHAR) LEN(4) 070220
0005.00 DCL VAR(&DATE2) TYPE(*CHAR) LEN(10) 070220
0006.00 RTVSYSVAL SYSVAL(QDATE) RTNVAR(&DATE) 070220
0007.00 RTVSYSVAL SYSVAL(QTIME) RTNVAR(&TIME) 070220
0008.00 RTVDTAARA DTAARA(SUBBU/DATTIM (1 10)) RTNVAR(&DATE2) 070220
0009.00 RTVDTAARA DTAARA(SUBBU/DATTIM (11 4)) RTNVAR(&TIME2) 070220
0010.00 DSPAUDJRNE ENTTYP(AF CO CD CP SV CA DO JS SF PW SV ZC) + 070220
0011.00 FROMTIME(&DATE2 &TIME2) 070220
0012.00 CHGDTAARA DTAARA(SUBBU/DATTIM (1 10)) VALUE(&DATE) 070220
0013.00 CHGDTAARA DTAARA(SUBBU/DATTIM (11 7)) VALUE(&TIME) 070220
0014.00 /******************************************************************************/ 070220
0015.00 SBMJOB CMD(PRTDSKINF RPTTYPE(*LIB)) 070220
0016.00 DSPSYSSTS OUTPUT(*PRINT) 070220
0017.00 /******************************************************************************/ 070220
0018.00 ENDPGM 070220
****************** End of data ******************************************************************************************

Hope this helps.

Thank you and you can reach me at dean@iseriesuniversity.com

Subramaniam.S

0 Comments:

Post a Comment

<< Home