Previous Topic: 10.2.4 Analyzer Output Exits

Next Topic: Appendix A. MESSAGES

10.2.5 Special Exits


This section provides an in-depth description of the CA MICS
Analyzer Option for VM/CMS standard user exits that are not
classified as input or output in the processing flow.

Each exit description includes the name and title, a
description of its purpose, when it is invoked, and whether
it has an interface to the CA MICS Installation Accounting
Component.  It also shows which data elements are available
and any special considerations that should be taken into
account.


+---------------+
| V M C A C R T | Account Routine
+---------------+

This exit is discussed in detail in Section 7.1.1.2.

+---------------+
| L N X A C R T | Linux Account Routine
+---------------+

This exit is discussed in detail in Section 7.1.1.3.

+---------------+
| V M C U A C P | VMCACT User File Pre-Processing
+---------------+

DESCRIPTION:  This exit is used to process data read within
the VMCUACC exit or to manipulate files prior to standard
post processing.

INVOCATION:  This exit is invoked during the Account Data
Post-Processing Phase in VMCACT before post-processing has
been performed for the standard VMC Account-based files.

ACCOUNTING INTERFACE:  No interface is provided.

USES:  This exit may be used to SORT and process any file
created in the VMCUACC exit, or to add elements to a file
created by the account input phase.

ELEMENTS AVAILABLE:  All elements in the files processed.

CODING RESTRICTIONS:  The code in this exit must be self-
contained SAS DATA and/or PROC steps.

SPECIAL NOTES:  If the data input using the VMCUACC exit is
intended to be added to a standard CA MICS VMC file, this
exit can be used to combine the custom work file with the
existing standard file in the DETAIL data set.

SAMPLE USER EXIT:  Sort the work file, set counters for
summarization, and write the file to DETAIL:

  %MACRO VMCUACP;
  %LET BY = SYSID USER ENDTS;
  %WRKSORT(CCC=VMC,WRK=CMU);
  %WRKSORT(CCC=VMC,WRK=UAC);
  /* THE VMCUAC DATA WILL HAVE ENDTS LESS THAN OR EQUAL */
  /* TO THE VMCCMU ENDTS. THE VMCCMU WILL BE UPDATED TO */
  /* CONTAIN A COUNT OF EVENTS ACCUMULATED FROM THE     */
  /* VMCUAC FILE.                                       */
  DATA
  %MAINWRK(CCC=VMC,WRK=CMU);
   MERGE %WRKMERG(CCC=VMC,WRK=CMU,IN=CMU)
         %WRKMERG(CCC=VMC,WRK=UAC,IN=UAC) ;
    BY &BY;
    RETAIN PND 0;
    IF CMU THEN DO;
      /* OUTPUT IF COUNTS PENDING OR NO COUNTS AT ALL   */
      IF PND OR LAST.USER THEN
          %WRKOUT(CCC=VMC,WRK=CMU);
      CMUCOUNT=0;
      PND = 0;
    END;
    ELSE DO;
      PND = 1;
      CMUCOUNT+1;
    END;
    IF LAST.USER THEN DO;
      /* OUTPUT IF COUNTS PENDING                       */
      IF PND THEN
          %WRKOUT(CCC=VMC,WRK=CMU);
      CMUCOUNT=0;
      PND = 0;
    END;
  RUN;
  %MEND  VMCUACP;

Note:  This example is based on the examples for exits
VMCUACA, VMCUACB, VMCUACC, and VMC0EXIT.

+---------------+
| V M C U A C D | VMCACT User File Post-Processing
+---------------+

DESCRIPTION:  This exit is used to process data read within
the VMCUACC exit.

INVOCATION:  This exit is invoked during the Account Data
Post-Processing Phase in VMCACT after post-processing has
been performed for all standard VMC Account-based files.

ACCOUNTING INTERFACE:  No interface is provided.

USES:  This exit may be used to SORT and process any file
created in the VMCUACC exit and write the file to the DETAIL
data set.

ELEMENTS AVAILABLE:  All elements in the files processed.

CODING RESTRICTIONS:  The code in this exit must be self-
contained SAS DATA and/or PROC steps.

SPECIAL NOTES:  If the data input using the VMCUACC exit is
intended to be added to a standard CA MICS VMC file, this
exit can be used to combine the custom work file with the
existing standard file in the DETAIL data set.

SAMPLE USER EXIT:  Sort the work file, set counters for
summarization, and write the file to DETAIL:

  %MACRO VMCUACD;
   %LET BY = %UACSEQ(TS=DETAIL);
   %WRKSORT(CCC=VMC,WRK=UAC);

    DATA  %WRKXFREF(OP=SASFILE,WRK=UAC,CCC=VMC)
          (%UACFILE(OP=FILEOPTS,TS=DETAIL) LABEL=&UACSFDF);
     SET %WRKMERG(CCC=VMC,WRK=UAC);
     BY &BY;
     %UACLBL;                           /* ELEMENT LABELS */
     RETAIN ZERO 0 ONE 1;
     IF FIRST.UACSTUFF THEN UACCOUNT = ONE; /* ONE SET ON */
     ELSE UACCOUNT = ZERO;                  /* CHANGE     */
   RUN;
  %MEND  VMCUACD;

Note:  This example is based on the examples for exits
VMCUACA, VMCUACB, VMCUACC, and VMC0EXIT.


+---------------+
| V M C U M X D | VMCMXA User File Post-Processing
+---------------+

DESCRIPTION:  This exit is used to process data read within
the VMCUMXC exit.

INVOCATION:  This exit is invoked during the z/VM Monitor
Data Post-Processing Phase in VMCMXA after post-processing
has been performed for all standard monitor-based files.

ACCOUNTING INTERFACE:  No interface is provided.

USES:  This exit may be used to SORT and process any file
created in the VMCUMXC exit and write the file to the DETAIL
data set.

ELEMENTS AVAILABLE:  All elements in the files processed.

CODING RESTRICTIONS:  The code in this exit must be self-
contained SAS DATA and/or PROC steps.

SPECIAL NOTES:  If the data input using the VMCUMXC exit is
intended to be added to a standard CA MICS VMC file, this
exit can be used to combine the custom work file with the
existing standard file in the DETAIL data set.

SAMPLE USER EXIT:  Sort the work file, set counters for
summarization, and write the file to DETAIL:

  %MACRO VMCUMXD;
   %LET BY = SYSID USER ENDTS;
   PROC SORT NODUP NOEQUALS DATA=WORK.USERFILE; BY &BY; RUN;

   DATA DETAIL.USERFILE(KEEP=SYSID USER ENDTS USERFLD1
     USERFLD2  LABEL=Sample User Monitor File);
     SET WORK.USERFILE; BY &BY;
     RETAIN ZERO 0 ONE 1;
     .....custom processing.....
     OUTPUT DETAIL.USERFILE;
   RUN;
  %MEND  VMCUMXD;

Note:  This example is based on the examples for exits
VMCUMXA, VMCUMXB, and VMCUMXC.

+---------------+
| V M C U P R C | Post-Processing Exit
+---------------+

DESCRIPTION:  This exit is used to perform any site-specific
function that requires access to the VMC files after data
input and post-processing has completed.  The Input History
Log and VMC Exception Files have been created from the
intermediate file before this exit is called.

INVOCATION:  This exit is invoked after all other processing
has been completed and before the summary and aging routines
are entered.

ACCOUNTING INTERFACE:  No interface is provided.

USES:  This exit may be used to examine files from any of the
input data processing routines for site-specific use.

ELEMENTS AVAILABLE:  All elements in the files processed.

CODING RESTRICTIONS:  The code in this exit must be self-
contained SAS DATA and/or PROC steps.

SPECIAL NOTES:  Not Applicable

SAMPLE USER EXIT:  For a complex that has a VM guest of VM,
determine what part of the VM CPU consumption the VM user
IMAGUEST is between 9:30 a.m. and 11:30 a.m.

  %MACRO VMCUMXD;
   DATA USER(KEEP=TTIME USER SYSID);
     SET &XVMU..VMXVXU00; BY SYSID USER;
     IF SYSID = 'VMSP';
     IF USER  = 'IMAGUEST'; /* GUEST OF SP SYSTEM   */
     IF '09:30'T < ENDTS <= '11:30'T;
     TTIME + VMUTTIME;      /* COLLECT ALL CPU TIME */
     IF LAST.USER;
     OUTPUT;
     STOP;
   RUN;
   DATA SYS(KEEP=SYSTIME SYSID);
     SET &XSGP..VMXSGP00; BY SYSID;
     IF SYSID = 'VMXA';
     IF '09:30'T < ENDTS <= '11:30'T;
     SYSTIME + SGPTOTTM;   /* COLLECT ALL CPU TIME */
   RUN;
   DATA _NULL_;
     MERGE SYS USER(RENAME=(SYSID=GUEST));
     PCT = 100 * USER/SYS;
     FILE PRINT;
     PUT "USERID " USER "ON SYSTEM " GUEST " CONSUMED"
         PCT 4.1 "PERCENT OF THE CPU OF SYSTEM " SYSID;
   RUN;
  %MEND  VMCUPRC;