Merging Archived OPSLOG without OPSVIEW
search cancel

Merging Archived OPSLOG without OPSVIEW

book

Article ID: 243413

calendar_today

Updated On:

Products

OPS/MVS Event Management & Automation

Issue/Introduction

While the OPSVIEW 7.1.4 (OPSLOG Tracking) panel provides functionality to merge archived OPSLOG, merging OPSLOG can also be achieved without requiring access to the panels.

Environment

Release : 13.5, 14.0

Component : OPS/MVS

Cause

At the time of writing, CCLXCNTL member ARCHMERGE is a method used to merge archived datasets into a single OPSLOG but does not provide the ability to save profile views. Product support is providing this document as a process for customers who need to extract profile-modified OPSLOG for later review.

Resolution

Allocating Prerequisite Datasets

  • Using a copy of CCLXCNTL(DEFDIV), create two OPSLOG DIV datasets used to store merged data:
    • The first will store the unfiltered archive (ARCHLOG)
    • The second will store the filtered data when this process completes (MERGELOG)

  • Some adjustments to the existing DEFDIV program include:
    • removal of SYSCHK1 definition and related code
    • renaming of OPSLOG DIV dataset to reflect MERGELOG data
    • resize OPSLOG DIV to a value to accommodate filtered data 

  • Using the sample below, allocate a physical sequential dataset, ensuring the file uses a RECFM of "FB" and LRECL of "640"

 

Adding ARCHLOG and MERGELOG to OPS/MVS

  • Allocating OPSLOG DIV can be accomplished via the OPSVIEW 4.13 panel

  • Use the "NEW" line command to add the OPSLOG DIV; be sure to specify "READONLY". Note the DDNAME value; to confirm, you'll have two: "ARCHLOG" and "MERGELOG"

  • After adding, use the "ACTIVATE" column command to activate the OPSLOG for browsing and general use

 

Restoring Archived OPSLOG

  • Using OPSVIEW 7.1.4, identify and note the archived OPSLOG being reviewed. For multiple OPSLOGs, use the OPSLOG MERGE utility prior to continuing

  • Enter OPSVIEW 7.1.3, using the information previously gathered to generate an OPSLOG DIV:
    • For "Archived OPSLOG" data set name, use the ARCHIVE model and version identified in OPSVIEW panel 7.1.4 (or the merged OPSLOG)
    • For "Target OPSLOG" data set name, use the OPSLOG DIV defined in the prerequisite work

  • Enter OPSVIEW 4.13. At this point, you should see your previously allocated MERGELOG DIV and your ARCHIVE DIV.

 

Extrapolating Archived OPSLOG

Using the REXX below, access the merged OPSLOG to pull the requested date and time ranges from the ARCHLOG. Following the completion of this step, enter OPSLOG and issue "LOGN MERGELOG" to switch to the merged OPSLOG populated by this step.

/* Enable tracing as needed */                                                  
trace i                                                                         
                                                                                
/*============================================================================*/
/*                                                                            */
/*     -- Prior to running, ensure these prerequisites are met:  --           */
/*                                                                            */
/*  - Allocate a PS FB LRECL 640 dataset that will be used to copy OPSLOG     */
/*    records.                                                                */
/*                                                                            */
/*  - An OPSLOG DIV (allocated via DEFDIV) that will house the merged         */
/*    archived log.                                                           */
/*                                                                            */
/*  - Ensure the merged OPSLOG and allocated OPSLOG DIV are both set to       */
/*    "active" and marked "readonly".                                         */
/*                                                                            */
/*============================================================================*/

/* Execute an OPS/REXX exec that copies OPSLOG entries extracted from the     */
/* archived OPSLOG DIV allocated in Step 1 of the instruction set to a        */
/* previously defined PS dataset.                                             */
                                                                                
ADDRESS OPSDYNAM                                                                
"ALLOCATE DD(STAGING) DSN('BRCM.OPSMVS.R####.MERGELOG.ENTRIES') SHR REUSE"    
 DO WHILE QUEUED() > 0                                                          
   PULL IT                                                                      
    SAY IT                                                                      
    SAY 'ERRCD' OPSERCD                                                         
    SAY 'IF CD' OPSIFCD                                                         
END                                                                             
                                                                                
V = OPSLOG('EXTOPMO TIME(07:30:00) DATE(31MAY) MSGCOUNT(1000)',                
'LOGNAME(ARCHLOG) DDNAME(STAGING)')                                          
                                                                                
                                                                                
/* This step moves the extracted OPSLOG messages from the PS Dataset to a     */
/* previously defined OPSLOG DIV used for saving filtered OPSLOG entries      */
                                                                                
ADDRESS OPSDYNAM                                                                
"ALLOCATE DD(STAGING) DSN('BRCM.OPSMVS.R####.MERGELOG.ENTRIES') SHR REUSE"    
 DO WHILE QUEUED() > 0                                                          
   PULL IT                                                                      
    SAY IT                                                                      
    SAY 'ERRCD' OPSERCD                                                         
    SAY 'IF CD' OPSIFCD                                                         
END                                                                             
                                                                                
ADDRESS TSO                                                                     
Z = OPSLOGMG('LOAD DDNAME(STAGING) LOGNAME(MERGELOG) RESET')                  
                         
DO WHILE QUEUED() > 0     
PULL IT                   
SAY  IT                   
END                                                                       

Additional Information

Usage Notes

  • OPSVIEW panel access is required to configure this solution
  • When selecting OPSLOGs, customers can use the OPSLOG MERGE Utility to store combine the OPSLOG prior to interrogation and offload using this process
  • When using DEFDIV sample, some users may opt to code more than two OPSLOG DIV datasets; this is acceptable but not required
  • This process can be ran in a batch job, assuming proper authorization is granted to the submitting user
  • "ARCHLOG" and "MERGELOG" can be substituted with any eight-character NAME
  • OPSLOG extract function details are examples; ensure OPSLOG contains date and time entries

 


Related Documentation

 


Sample | PS File Attributes Used for Storing OPSLOG entries

Data Set Name . . . . : BRCM.OPSMVS.R####.MERGELOG.ENTRIES               
                                                                        
General Data                           Current Allocation               
Management class . . : BRCMMC        Allocated cylinders : 2        
Storage class  . . . : BRCMSC        Allocated extents . : 1        
Volume serial . . . : BC1000                                        
  Device type . . . . : 3390                                            
Data class . . . . . : BRCMDC                                      
  Organization  . . . : PS             Current Utilization              
  Record format . . . : FB              Used cylinders  . . : 0         
  Record length . . . : 640             Used extents  . . . : 0         
Block size  . . . . : 64000                                            
  1st extent cylinders: 2                                               
  Secondary cylinders : 5              Dates                            
  Data set name type  :                 Creation date . . . : 2022/06/07
  Data set encryption : NO              Referenced date . . : ***None***
                                        Expiration date . . : ***None***
                                                                        
  SMS Compressible  . : NO       

Sample | REXX Code

/* Enable tracing as needed */                                                  
trace i                                                                         
                                                                                
/*============================================================================*/
/*                                                                            */
/*     -- Prior to running, ensure these prerequisites are met:  --           */
/*                                                                            */
/*  - Allocate a PS FB LRECL 640 dataset that will be used to copy OPSLOG     */
/*    records.                                                                */
/*                                                                            */
/*  - An OPSLOG DIV (allocated via DEFDIV) that will house the merged         */
/*    archived log.                                                           */
/*                                                                            */
/*  - Ensure the merged OPSLOG and allocated OPSLOG DIV are both set to       */
/*    "active" and marked "readonly".                                         */
/*                                                                            */
/*============================================================================*/

/* Execute an OPS/REXX exec that copies OPSLOG entries extracted from the     */
/* archived OPSLOG DIV allocated in Step 1 of the instruction set to a        */
/* previously defined PS dataset.                                             */
                                                                                
ADDRESS OPSDYNAM                                                                
"ALLOCATE DD(STAGING) DSN('BRCM.OPSMVS.R####.MERGELOG.ENTRIES') SHR REUSE"    
 DO WHILE QUEUED() > 0                                                          
   PULL IT                                                                      
    SAY IT                                                                      
    SAY 'ERRCD' OPSERCD                                                         
    SAY 'IF CD' OPSIFCD                                                         
END                                                                             
                                                                                
V = OPSLOG('EXTOPMO TIME(07:30:00) DATE(31MAY) MSGCOUNT(1000)',                
'LOGNAME(ARCHLOG) DDNAME(STAGING)')                                          
                                                                                
                                                                                
/* This step moves the extracted OPSLOG messages from the PS Dataset to a     */
/* previously defined OPSLOG DIV used for saving filtered OPSLOG entries      */
                                                                                
ADDRESS OPSDYNAM                                                                
"ALLOCATE DD(STAGING) DSN('BRCM.OPSMVS.R####.MERGELOG.ENTRIES') SHR REUSE"    
 DO WHILE QUEUED() > 0                                                          
   PULL IT                                                                      
    SAY IT                                                                      
    SAY 'ERRCD' OPSERCD                                                         
    SAY 'IF CD' OPSIFCD                                                         
END                                                                             
                                                                                
ADDRESS TSO                                                                     
Z = OPSLOGMG('LOAD DDNAME(STAGING) LOGNAME(MERGELOG) RESET')                  
                         
DO WHILE QUEUED() > 0     
PULL IT                   
SAY  IT                   
END