Steps for setting up OPERLOG

Before you begin: You must define the logger subsystem.

Perform the following steps to set up OPERLOG.

  1. 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. Specify V OPERLOG,HARDCOPY,OFF to turn off OPERLOG.
  2. Define that the correspondent 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)
  3. Activate the CFRM policy using the START,POLICY,TYPE=CFRM,POLNAME=polname command, or the COUPLExx parmlib member.
  4. Define the log stream to the LOGR policy. The following example is for illustrative purposes only; you must 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(LOGR4K)		
    		HLQ(IXGLOGR)				
    		LS_SIZE(1024)			
    		LOWOFFLOAD(0)			
    		HIGHOFFLOAD(80)		
    		STG_DUPLEX(NO)			
    		RETPD(30)				
    		AUTODELETE(No)	
  5. Create the security definitions for RACF® (or for the equivalent security product). In the following example, the SYSPLEX.OPERLOG of the LOGSTRM resource CLASS is given READ permission, which allows everyone 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)
    Note: This example is for illustrative purposes only. Follow the guidelines for your installation.
  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 MVS™ system logger to retrieve and delete records from the OPERLOG 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 stream all the records created prior to a given date. When you use the delete option, a suggestion is to first copy the records on alternate media, and then conditionally delete them on 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 additional details about handling log data, see the topic on "Managing log data: How much? For how long?" in z/OS MVS Setting Up a Sysplex.

You know you are done when you enter the DISPLAY CONSOLES,HARDCOPY command and see OPERLOG.