JCL to be used to run batch MSU usage

book

Article ID: 125607

calendar_today

Updated On:

Products

CA SYSVIEW Performance Management NXBRIDGE - SYSYVIEW/ENDEVOR

Issue/Introduction

We would like to know if we can get 1-minute MSU usage report and how to do it from SYSVIEW, with a batch job, 

Attached you will find 2 files. MSU1HREX is the REXX execute that can be run on an hourly basis to capture the MSU1H data and save it to a file. Prior to executing you will need to specify a predefined sequential file (FB,133) and insert that in the execute.
The REXX execute must reside in your REXXLIB defined to SYSVIEW so it finds it.
The second file, MSU1SCHD is an example of a schedule capture event that may be scheduled hourly to run the REXX execute.
You can define an entry on the SYSVIEW SCHEDULE display to execute the capevent MSU1SCHD, hourly.
The disposition on the file you provide is MOD, to the data will continue to accumulate until you clear it out.

Environment

Release:
Component: SYSVW

Resolution

/* REXX                                                                      */
/*---------------------------------------------------------------------------*/
/* Issue command GRAPH MVS MSU1H every hour based on SCHEDULE event MSU1SCHD */
/* The execute below will update the specified file with the MSU 1 minute    */
/* values for the hour.                                                      */
/*---------------------------------------------------------------------------*/
trace i
GSVBSSID='GSVX'
ADDRESS 'LINK' 'GSVXRXAA'              /* Init SYSVIEW address env           */
Address 'SYSVIEW'
RC = EXTRACT('DATE')
apidiag_opt = yes                      /* Set on to get capture log          */
dsname = 'SYSVIEW.????????.MSU1H'
"COMMAND(GRAPH MVS MSU1H;SORT TIME A) STACK(NO)"
"COMMAND(SELECT) STACK(NO)"
"COMMAND(XVEXTRAC DATA Time Captime.)"
"COMMAND(XVEXTRAC DATA Value msu1h.)"
address 'TSO'
"ALLOC FI(TEMPIN) DA('"dsname"') MOD"
do i = 1 to Captime.0
   CALL WRITEOUT
end
CALL TERMINATE
EXIT 0
/*---------------------------------------------------------------------------*/
WRITEOUT:
queue LEFT(SYSV_DATE,10) ||,
      ','LEFT(Captime.i,8) ||,
      ','LEFT(msu1h.i,10)
   CALL FILEOUT
return
/*---------------------------------------------------------------------------*/
FILEOUT:
"EXECIO" queued() "DISKW TEMPIN (FINIS"
return
/*---------------------------------------------------------------------------*/
/* Exit procedure                                                            */
/*---------------------------------------------------------------------------*/
TERMINATE:
"FREE FI(TEMPIN)"
"EXECIO 0 DISKW TEMPIN (FINIS"
/*---------------------------------------------------------------------------*/
/* Formal termination of the API is required.                                */
/* Abends will occur if this step is omitted.                                */
/*---------------------------------------------------------------------------*/
  IF apidiag_opt=yes THEN
      RC = APIDIAGI(gsvxapie_apic, w3, 'DLDELETE')

ADDRESS 'SYSVIEW' "C(END)"             /* Terminate SYSVIEW session          */
EXIT 0

Additional Information

Here is the Scheduling/Capture that needs defined:

*------------------------------------------------------------*
*       Event Capture save MSU1H values hourly.              *
*                                                            *
*------------------------------------------------------------*
CONTROL  NOFLUSH
CAPPARMS DESCR C'Save MSU1H values'
RXDISP MSU1HREX