System log and the system log user exit

Content Manager OnDemand generates messages about the various actions that occur on the system. For example, when a user logs on the system, Content Manager OnDemand generates a message that contains the date and time, the type of action, the user ID, and other information.

You can configure Content Manager OnDemand to save the messages to a system log. In addition, you can configure the system to send the messages to a user-defined program. The user-defined program can process the messages in any way that you want. For example, it could send alerts to administrators, compile statistics, or generate accounting information.

You must do the following to configure the system to send the messages to a user-defined program:
  • Enable Content Manager OnDemand to generate system messages and specify the types of messages generated by selecting the appropriate options in the System Parameters dialog box.
  • Enable Content Manager OnDemand to generate application group messages by selecting the appropriate option in the System Parameters dialog box.
  • Specify the types of application group messages generated by selecting options on the Message Logging page in application groups.
  • Enable Content Manager OnDemand to send messages to a user-defined program by selecting the appropriate options in the System Parameters dialog box.
After you have completed these steps, Content Manager OnDemand automatically saves the messages in the system log and sends the messages to the user-defined program.

Content Manager OnDemand sends the messages to a program called ARSLOG. The ARSLOG program supplied by IBM® does not perform any functions. However, you can replace the ARSLOG program supplied by IBM with a user-defined program that does specific functions, such as checking the message number and issuing alerts to administrators.

The messages that Content Manager OnDemand sends to the ARSLOG program contain the parameters listed in the table.
Table 1. ARSLOG program parameters (system log user exit program)
Parameter Purpose Size Example
$1 Content Manager OnDemand instance 10 char QUSROND
$2 Time stamp 20 char 08/13/95 14:24:31
$3 Log record identifier 10 char 57049
$4 Content Manager OnDemand user ID 128 char QONDADM
$5 User's accounting information 60 char Z76-001J/999999
$6 Severity:
1
Alert
2
Error
3
Warning
4
Information
5
Debug
1 char 3
$7 Message number 5 char 31
$8 Message text 255 char Failed Login: od400lib1 7.52.365.12
$9 Document file 256 char This parameter is used only if the system log message being passed to the user exit has additional information not included in the message text. The file is deleted immediately after the exit program returns control to Content Manager OnDemand.1
Note:
  1. For example, when viewing system log messages 87 or 88 from the Content Manager OnDemand Client, Yes is indicated under the View column heading of the document list. View=Yes indicates that additional information is available for those messages. The document file parameter contains the complete path name of the file that contains the additional text for the user exit to process. The file is stored in the directory that is specified by the ARS_TMP parameter in the ARS.CFG file. An example of the contents of this parameter as it is passed to the user exit might be: /QIBM/USERDATA/ONDEMAND/QUSROND/TMP/ARS.155.0000000000000013.SYSLOG.

If you create your own ARSLOG program, remember that the ARSLOG program and any programs that it might call run as user QRDARS400. QRDARS400 must have authority to any objects that your ARSLOG program uses.

Content Manager OnDemand programs are coded in the C language. However, the ARSLOG program can be written in any language. It is your responsibility to develop the ARSLOG program. You must validate the quality and performance of the ARSLOG program and any other programs that it calls.

A sample ARSLOG CL program can be found in source file QSAMPLES2 in libraries QRDARS and QUSRRDARS. Any program source code that you modify should not be placed in QRDARS because that library is replaced during software upgrades. However, QUSRRDARS library is not replaced and can be used for your modified source.

Once you have created your program, you should compile the program and place it in your own library (not QRDARS). Then, you must change the symbolic link at /QIBM/PRODDATA/ONDEMAND/BIN/ARSLOG to point to your program. For example, if you called your program MYARSLOG and placed it in library QUSRRDARS, you would first delete the current symbolic link using this command: RMVLNK OBJLNK('/QIBM/PRODDATA/ONDEMAND/BIN/ARSLOG'). Then, you would add the link to your program using this command: ADDLNK OBJ('/QSYS.LIB/QUSRRDARS.LIB/MYARSLOG.PGM') NEWLNK('/QIBM/PRODDATA/ONDEMAND/BIN/ARSLOG')

The last step is to ensure that the ARSLOG program is enabled. Check the ARS.CFG file to confirm that the ARS_DISABLE_ARSLOG entry is not set to a 1 (to disable) for the instance for which you can enable logging. ARS_DISABLE_ARSLOG=1 disables the ARSLOG exit program.

The online Help for the administrative client provides information about enabling Content Manager OnDemand to generate messages and send them to the ARSLOG program. The online Help also provides information about how to select which application group messages that Content Manager OnDemand generates and sends to the ARSLOG program.