How To Generate DB2 MBO Reports Adhoc
search cancel

How To Generate DB2 MBO Reports Adhoc

book

Article ID: 232031

calendar_today

Updated On:

Products

MICS Resource Management

Issue/Introduction

The MICS DB2 component delivers a series of Management by Objective (MBO) reports.  
These reports are fully documented in Chapter 3, Reports, in the DB2 Analyzer Guide.  
These reports are automatically run when the the MBO reporting parameter in prefix.MICS.PARMS(EXECDEF) is set to the following:

REPORT    MBODAILY       ALL,DB2,NONE

The MBO reports summarize data from all DB2 subsystems in the environment.  
Users have requested how to run a subset of these reports and maybe target a specific DB2 subsystem to override the "* ALL*" assignment.

Environment

Release: All
Component: MDB2

Resolution

Using this sample JCL, the user can run the reports on an adhoc basis selecting a specific DB2 subsystem:

//your JOB card                      
//  JCLLIB ORDER=sharedprefix.MICS.PROCLIB                                       
//STEP1 EXEC MICSSHRx   <--(x = unit identifier)                                                 
//SYSIN DD *                                                          
 %INCLUDE USOURCE(#BASMSTR);                                          
 %INCLUDE  SOURCE($DB2SFD);                                           
 %INCLUDE  SOURCE(#DB2MSTR);                                          
 %INCLUDE  SOURCE(#DB2MOBJ);                                          
 * REPORT-REQUEST SETTINGS BELOW -- SEE DB2 GUIDE, SECT 3.1.1. ;      
 %LET  SYSREP  = N;                                                   
 %LET  DDYREP  = N;                                                   
 %LET  DBMREP  = N;                                                   
 %LET USRAREP  = N;                                                   
 %LET  DDUREP  = N;                                                   
 %LET PLANREP  = N;                                                   
 %LET  DDPREP  = N;                                                   
 %LET PLANSUM  = N;                                                   
 %LET  CALREP  = N;                                                   
 * ;        
 * FAKE-OUT THE DB2ACTPT OVERRIDE-ASSIGNMENT ;          
 * ;                                                    
 %INCLUDE SOURCE(DYDB2MBO);                             
 %LET DB2AUTH = DB2AUTH;                                
 %LET DB2OPID = DB2OPID;                                
 %LET DB2CONN = DBOCONN;                                
 %LET DB2CORR = DB2CORR;                                
 %LET DB2PLAN = DB2PLAN;                                
 %LET DSUFID=DB2DSU01;   /* change cycle number if needed */                               
 %LET DDUFID=DB2DDU01;                                  
 %LET BY = SYSID DB2ID;                                 
 %LET BREAK = DB2ID;                                    
 %USRREPT              /* launch DB2 Accounting Rpt */   
                                            
 RUN;   

To add a subsetting IF statement to possibly target a specific DB2 subsystem, code one of the %LET statements as follows stacking SAS statements.  In this case a subsetting IF.

%LET DB2AUTH = %NRSTR(DB2AUTH; IF DB2ID='AD01';); 

Additional Information

More information regarding these MBO reports can be found at the following link.