Report of the SYSVIEW MAXCAD value
search cancel

Report of the SYSVIEW MAXCAD value

book

Article ID: 394009

calendar_today

Updated On:

Products

SYSVIEW Performance Management

Issue/Introduction

Does SYSVIEW have a command to report the usage and utilization of the MAXCAD value of z/OS?

Environment

SYSVIEW 17.0 - z/OS supported releases

Resolution

The following is the REXX execute to monitor the MAXCAD value:

  1. Create a member in the *.CNM4BCAP library with contents similar to the following, calling it MAXCAD.

    *------------------------------------------------------------*
    *       Event Capture save MAXCAD values hourly              *
    *------------------------------------------------------------*
    CONTROL  NOFLUSH                                              
    CAPPARMS DESCR C'Save MAXCAD values'                          
    RXDISP MAXCAD                                                 

     

  2. Create a member in the *.CNM4BREX library with contents similar to the following, calling it MAXCAD.

    /* REXX                                                                      */
    /*---------------------------------------------------------------------------*/
    /* Issue command MAXCAD and evaluate the INFO area of the display to         */
    /* determine current MAXCAD usage.                                           */
    /*                                                                           */
    /* This execute is meant to be triggered by a CAPTURE member that is kicked  */
    /* off by a SCHEDULE event.                                                  */
    /*                                                                           */
    /* variable 'dsname' needs to point to a sequential file allocated with      */
    /* DCB FB/240. Each execution of this REXX will add an additional line to    */
    /* to the sequential file. SYSVIEW needs write access to the sequential      */
    /* file, as well as exclusive access.                                        */
    /*                                                                           */
    /* Variable Maxvalue needs set to a value you wish to be notified of when it */
    /* is exceeded.                                                              */
    /*                                                                           */
    /* Variable userform must point to something that looks like an email        */
    /* address, it doesn't necessarily have to be available.                     */
    /*                                                                           */
    /* Variable userform should point to a valid email or GROUP                  */
    /*                                                                           */
    /*---------------------------------------------------------------------------*/
    /* trace all */                                                                
                                                                                   
    Maxvalue = 30                             /****     Needs updated         ****/
    dsname   = 'SYSVIEW.MAXCAD.TEST'          /****     Needs updated         ****/
    userfrom = "SYSVIEW@????????.com"         /****     Needs updated         ****/
    userto   = "someonesemail@????????.com"  /****     Needs updated         ****/
                                                                                   
                                                                                   
    GSVBSSID='GSVX'                        /* SYSVIEW subsys ID                  */
    ADDRESS 'LINK' 'GSVXRXAA'              /* Init SYSVIEW address environment   */
    Address 'SYSVIEW'                                                              

    RC = EXTRACT('DATE')                                                           
    RC = EXTRACT('TIME')                                                           
                                                                                   
    "COMMAND(DSLIST;OPT NOUSEBLK) STACK(NO)"  /* Issue DSLIST command            */
    "COMMAND(XVEXTRAC INFOFLD EXTENDED)"      /* Point to INFO area for data     */
                                                                                   
    /* Extract the needed data                                                   */
    PARSE VAR SYSV_INFOFLD.1  CADSMax     CADSMax                                  
    PARSE VAR SYSV_INFOFLD.2  CADSUsed    CADSUsed                                 
    PARSE VAR SYSV_INFOFLD.3  CADSHwm     CADSHwm                                  
                                                                                   
    address 'TSO'                                                                  
    "ALLOC FI(TEMPIN) DA('"dsname"') MOD" /* allocate the output file            */
                                                                                   
    CALL WRITEOUT                         /* write to the output file            */
    CALL TERMINATE                        /* free the file and exit              */
                                                                                   
    EXIT 0                                                                         
    /*---------------------------------------------------------------------------*/
    /* Write detail lines and issue email if needed                              */
    /*---------------------------------------------------------------------------*/
    WRITEOUT:                                                                      
    queue LEFT(SYSV_DATE,10)   ||,                                                 
          ','LEFT(SYSV_TIME,8) ||,                                                 
          ','LEFT(CADSMax,2)   ||,                                                 
          ','LEFT(CADSUsed,2)  ||,                                                 
          ','LEFT(CADSHwm,2)                                                       
       CALL FILEOUT                                                                
                                                                                   
    If CADSUsed > Maxvalue then SIGNAL 'EMAIL'                                     
    return                                                                         
    /*---------------------------------------------------------------------------*/
    /* Write line to output file                                                 */
    /*---------------------------------------------------------------------------*/
    FILEOUT:                                                                       
    "EXECIO" queued() "DISKW TEMPIN (FINIS"                                        
    return                                                                         
    /*---------------------------------------------------------------------------*/
    /* Email                                                                     */
    /*---------------------------------------------------------------------------*/
    EMAIL:                                                                         
    ADDRESS "LINK" "GSVXRXAA"              /* Init SYSVIEW address env           */
    Address 'SYSVIEW'                                                              
                                                                                   
    Subject  = "SYSVIEW : MAXCAD is greater than "Maxvalue""                       
    "COMMAND(SET EMAILID C'"userfrom"')"                                           
    "COMMAND(SENDMAIL TO "userto" SUBJECT C'"subject"')"                           
    "INPUT(1,'"date()" "time()"')"                                                 
    "COMMAND(SEND TEXT CLEAR)"                                                     
    "COMMAND(RETURN)"                                                              
                                                                                   
    ADDRESS 'SYSVIEW' "C(END)"             /* Terminate SYSVIEW session          */
    Return                                                                         
    /*---------------------------------------------------------------------------*/
    /* The following is an example of using a GROUP name, CICSMAWK, instead of   */
    /* sending to a single email address.                                        */
    /* "COMMAND(LINK SENDMAIL TO CICSMAWK SUBJECT C'"subject"')"                 */
    /*---------------------------------------------------------------------------*/
    /* Terminate                                                                 */
    /*---------------------------------------------------------------------------*/
    TERMINATE:                                                                     
    "FREE FI(TEMPIN)"                                                              
    "EXECIO 0 DISKW TEMPIN (FINIS"                                                 
    ADDRESS 'SYSVIEW' "C(END)"             /* Terminate SYSVIEW session          */
    EXIT 0                                                                         
     
  3. Create a SCHEDULE event that looks similar to the following

    DEFINE MAXCAD     DESC 'MAXCAD Usage                            ' 
           GROUP      CAPTURE                                         
           TYPE       RECUR                                           
           ALLDAYS                                                    
           DATEBEGIN  *         DATEEND *                             
           TIMEBEGIN  00:00:00  TIMEEND *                             
           EVERY      1HOUR                                           
           LIMIT      NOLIMIT                                         
           FUNCTION   CAPTURE                                         
           PARMS      'MAXCAD'                                        
           DISABLED                                                   
    ENDDEFINE                                                         

Note: 1 hour is set for EVERY but it can scheduled more frequently.

When the schedule name MAXCAD is created in *.CNM4BPRM, its definition can be loaded to SYSVIEW for execution:

To RELOAD the SCHEDULE events, go to the ASADMIN display and STOP the SCHEDULE subtask, then START the subtask with Parm of COLD.
The event can be ADDED directly from the SCHEDULE display using the ADD line command. The GROUP would be CAPTURE and the Function of CAPTURE with PARMS equal to MAXCAD.

Note: If the SCHEDULE event is restarted with COLD, anything edited via the SCHEDULE display will be lost.