Enabling the operations log (OPERLOG)

The operations log (OPERLOG) is a sysplex-wide log of system messages (WTOs) residing in a system logger log stream, comparable to SYSLOG, which is a single system message log residing on JES spool.

If OPERLOG is enabled on your system, z/OSMF can use OPERLOG to collect message data on a sysplex wide basis. Here, OPERLOG must be active in a system logger log stream. For the steps to follow, see Steps for setting up OPERLOG.

If you choose to defer this step, z/OSMF collects message data on a single system basis, using the system log (SYSLOG) as the source.

How to check if this step is done

To display the active medium where messages are recorded, enter the following command:
D C,HC 
Figure 1 shows the expected results:
Figure 1. Expected results from the D C,HC command
CNZ4100I 15.19.16 CONSOLE DISPLAY 056                               
 CONSOLES MATCHING COMMAND: D C,HC                                   
 MSG:CURR=0    LIM=9000 RPLY:CURR=0    LIM=9999  SYS=P02      PFK=00 
 HARDCOPY  LOG=(SYSLOG,OPERLOG)  CMDLEVEL=CMDS                       
       ROUT=(ALL)                                                    
 LOG BUFFERS IN USE: 0       LOG BUFFER LIMIT: 9999                  

Steps for setting up OPERLOG

The following instructions are a summary of the details found in IBM® Redbook System Programmer's Guide to: z/OS System Logger, which is available from http://www.redbooks.ibm.com/. For more information about setting up OPERLOG, see the topic on preparing to use system logger applications in z/OS MVS Setting Up a Sysplex.

Before you begin

You must define the logger subsystem.

Procedure

  1. Define the OPERLOG coupling facility structure in the CFRM policy. For example:

    //OPERLOG JOB CLASS=A,MSGCLASS=A
    //POLICY EXEC PGM=IXCMIAPU
    //SYSPRINT DD SYSOUT=A
    //SYSIN DD *
    DATA TYPE(CFRM)
    STRUCTURE NAME(OPERLOG)
    SIZE(40448)
    INITSIZE(40448)
    PREFLIST(FACIL01,FACIL02)

  2. Activate the CFRM policy through the SETXCF START,POLICY,TYPE=CFRM,POLNAME=polname command, or through the COUPLExx parmlib member.
  3. Define the log stream to the LOGR policy. The following example is for illustrative purposes only; follow the recommendations in z/OS MVS Setting Up a Sysplex and z/OS MVS Programming: Assembler Services Guide.

    //OPERLOG JOB CLASS=A,MSGCLASS=A
    //POLICY EXEC PGM=IXCMIAPU
    //SYSPRINT DD SYSOUT=A
    //SYSIN DD *
    DATA TYPE(LOGR)
    DEFINE STRUCTURE NAME(OPERLOG)
    LOGSNUM(1)
    MAXBUFSIZE(4092)
    AVGBUFSIZE(512)
    DEFINE LOGSTREAM NAME(SYSPLEX.OPERLOG)
    STRUCTNAME(OPERLOG)
    LS_DATACLAS(LOGR24K)
    HLQ(IXGLOGR)
    LS_SIZE(1024)
    LOWOFFLOAD(0)
    HIGHOFFLOAD(80)
    STG_DUPLEX(NO)
    RETPD(0)
    AUTODELETE(No)

  4. Create the security definitions for RACF® (or an equivalent security product). In the following example, the SYSPLEX.OPERLOG of the LOGSTRM resource CLASS is given READ permission, which allows all users to browse the operations log and userid1 has UPDATE access level, which allows userid1 to delete records from the log stream. That is, the user ID associated with the job running the IEAMDBLG program. For example:

    RDEFINE LOGSTRM SYSPLEX.OPERLOG UACC(READ)
    PERMIT SYSPLEX.OPERLOG CLASS(LOGSTRM) ID(userid1)
    ACCESS(UPDATE) SETROPTS CLASSACT(LOGSTRM)

    This example is for illustrative purposes only. Follow the guidelines for your installation.

  5. Define the hardcopy device as OPERLOG in the HARDCOPY statement of the CONSOLxx parmlib member. You can change this setting using the V OPERLOG,HARDCPY command.
  6. After you activate OPERLOG, you must manage the way in which records are handled.

    SYS1.SAMPLIB contains a sample program, IEAMDBLG, to read log blocks from the OPERLOG log stream and convert them to SYSLOG format. The program is an example of how to use the services of the system logger component to retrieve and delete records from the OPERLOG log stream. It reads the records created in a given time span, converts them from message data block (MDB) format to hardcopy log format (HCL or JES2 SYSLOG), and writes the SYSLOG-format records to a file. It also has an option to delete from the log stream the records created before a given date.

    When you use the delete option, you might want to first copy the records on alternate media and then conditionally delete the records in a separate JCL step to ensure that you have a copy of the data before deleting. If you do not run them on two separate conditional steps, deletion occurs simultaneously with copy without any guarantee that the copy process was successful.

    For more information, see the topic on managing log data in z/OS MVS Setting Up a Sysplex.

Results

To verify the completion of this work, enter the DISPLAY CONSOLES,HARDCOPY command to display the OPERLOG status.

What to do next

If you need to deactivate OPERLOG, you can use the V OPERLOG,HARDCPY,OFF command.