10. MODIFICATION › 10.2 Standard User Exits › 10.2.2 Analyzer Input Exits
10.2.2 Analyzer Input Exits
This section provides a description of the CA MICS VM and CMS
Analyzer standard user exits which are invoked during the
data input phases of the daily update 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.
NOTE: The examples for the following exits assume that a
user file is being added to the CA MICS VM and CMS
Analyzer and that it has been defined in VMCGENIN.
Input record format when record is generated by CP diagnose
instruction X'4C', Generate USER Account Record:
Field Name Columns Description
USER 1-8 Name of virtual machine generating
the record
ACCOUNT 9-16 VM account number
DATE 17-22 Date: MMDDYY
TIME 23-28 Time: HHMMSS
DURATION 29-32 Length of time represented by the
record
NAME 33-40 The name of the item being counted
CHGUSER 41-48 Name of the virtual machine to be
charged for using the resource
VMCRCODE 79-80 'C0' VM USER Account record ID
Input record format when record is not generated by the CP
diagnose instruction X'4C', Generate USER Account Record:
Field Name Columns Description
USER 1-8 Name of virtual machine using the
resource
ACCOUNT 9-16 VM account number
DATE 17-22 Date: MMDDYY
TIME 23-28 Time: HHMMSS
DURATION 29-32 Length of time represented by the
record
NAME 33-40 The name of the item being counted
VMCRCODE 79-80 'XX' installation specified ID
+---------------+
| V M C U A C A | VMCACT Data Statement File Definition
+---------------+
DESCRIPTION: The VMCUACA exit is used to add new SAS data
files to the DATA statement of the VMCACT routine.
INVOCATION: This exit is invoked during compilation of the
DATA statement in VMCACT.
ACCOUNTING INTERFACE: There is no interface to CA MICS
Accounting and Chargeback.
USES: This exit may be used to add one or more installation-
defined files to the Input Raw Account Data Phase.
ELEMENTS AVAILABLE: Not Applicable
CODING RESTRICTIONS: This macro should contain only code
that is valid on a SAS DATA statement. It should not contain
a semicolon. If a semicolon is present, a SAS 180 error will
occur.
SPECIAL NOTES: Not Applicable
SAMPLE USER EXIT: Define an intermediate file for
supplemental Account data:
%MACRO VMCUACA;
%MAINWRK(CCC=VMC,WRK=UAC,KEEP=%UACKEEP(TS=DETAIL)
%MEND VMCUACA;
+---------------+
| V M C U A C B | VMCACT Formats, Lengths, and Labels
+---------------+
DESCRIPTION: The VMCUACB exit is used to provide SAS
formats, lengths, and optional labels for any new SAS data
files added to the DATA statement of the VMCACT routine using
the %VMCUACA macro.
INVOCATION: This exit is invoked during compilation of the
DATA statement in VMCACT.
ACCOUNTING INTERFACE: There is no interface to CA MICS
Accounting and Chargeback.
USES: This exit may be used to provide SAS FORMAT, LENGTH
and LABEL statements for installation-defined files in the
Input Raw Account Data phase.
ELEMENTS AVAILABLE: Not Applicable
CODING RESTRICTIONS: This macro should not contain any
executable code.
SPECIAL NOTES: Not Applicable
SAMPLE USER EXIT: Provide formats and lengths for an
intermediate file containing supplemental Account data:
%MACRO VMCUACB;
%UACFMT(TS=DETAIL);
%UACLEN(TS=DETAIL);
%MEND VMCUACB;
+-----------------+
| V M C 0 E X I T | VMCACT Record Inspection
+-----------------+
DESCRIPTION: The VMC0EXIT exit is used for two purposes:
1) Inspect C0 Account records to determine whether or not
RSCS data is present.
2) Set processing flags for other custom or nonstandard
Account records.
INVOCATION: This exit is given control when a record other
than:
0C, 01, C1, 02, C2, 03, C3, 04, 05, 06, 07, 08, C8
is detected. The data elements VMCRCODE, USER, and VMCACNT
have been read. TS_CHK2 and TS_READ are set to ZERO when the
exit is called.
ACCOUNTING INTERFACE: There is no interface to CA MICS
Accounting and Chargeback.
USES: This exit is used to indicate the presence of RSCS
data and to cause date/time stamp read, and/or Check Routine
2 processing for custom or nonstandard Account records.
ELEMENTS AVAILABLE:
ORGSYSID - Original SYSID, set by VMCPGEN
VMCRCODE - Input record type code
USER - USERID from columns 1-8 of the record
VMCACNT - The account code from columns 9-16 of the
record
VRACHK - RSCS data indicator, exit sets to ONE if
VMCRCODE = 'C0' and the record contains RSCS
data.
VRALCLNN - RSCS local node name, exit sets this element
when VRACHK = ONE.
TS_READ - Exit sets TS_READ = ONE when the record
contains a VM Account format date/time stamp,
but the record contains data that is not
normally handled by VMC.
TS_CHK2 - Exit sets TS_CHK2 = ONE when the record does
not contain a VM Account format date/time
stamp, but the exit routine has set ENDTS and
wants a record that contains data not normally
handled by VMC to be date-range validated by
Check Routine 2.
CODING RESTRICTIONS:
This exit should not contain code that executes a LINK or
RETURN statement. A GOTO statement may only reference a
label defined within the exit.
SPECIAL NOTES: Not Applicable
SAMPLE USER EXIT: Detect RSCS and intermediate files
containing supplemental Account data:
%MACRO VMC0EXIT;
IF VMCRCODE EQ 'C0' THEN DO;
IF USER EQ :'NETWORK' THEN DO; /* RSCS ? */
VRACHK = YES; /* FLAG AS RSCS */
VRALCLNN = 'VMSYS'; /* LOCAL NODE NAME */
END;
ELSE IF USER EQ 'COUNTER' THEN /* C0 FORM OF OUR */
TS_READ = YES; /* XX RECORD */
END;
ELSE IF VMCRCODE EQ 'XX' THEN DO; /* OUR RECORD ? */
TS_READ = YES; /* OUR RECORD HAS */
END; /* VM DATE/TIME */
%MEND VMC0EXIT;
+---------------+
| V M C U A C C | VMCACT User and Custom Record Input
+---------------+
DESCRIPTION: The VMCUACC exit is used to read data elements
from a record not normally handled by VMC.
INVOCATION: This exit is called during the execution of the
unrecognized record routine, during the Input Raw Account
Data phase in VMCACT.
ACCOUNTING INTERFACE: There is no interface to CA MICS
Accounting and Chargeback.
USES: This is used to read installation-defined account
records and to output observations to installation-defined
files.
ELEMENTS AVAILABLE:
SYSID - System Identifier
VMCRCODE - Input record type code
USER - USERID from columns 1-8 of the record
VMCACNT - The account code from columns 9-16 of the
record
SKIP_REC - Drop input record
CODING RESTRICTIONS:
This exit should not contain code that executes a LINK or
RETURN statement. A GOTO statement may only reference a
label defined within the exit.
SPECIAL NOTES: Always code a hanging '@' on the INPUT
statement(s) to hold the current record. Failure to do this
will cause the following record to be lost when the current
record is flushed by VMC.
Set SKIP_REC to zero (0) to indicate that the record has been
read; otherwise, set SKIP_REC to one (1). This is used to
increment the proper record counters.
SAMPLE USER EXIT: INPUT data element from an installation-
defined account record.
%MACRO VMCUACC;
IF VMCRCODE = 'C0' AND USER = 'COUNTER' THEN DO;
/* C0 RECORD FORMAT */
INPUT @29 DURATION PIB4. /* LENGTH OF TIME */
UACSTUFF $CHAR8. /* WHAT WE'RE COUNTING */
USER $CHAR8. /* CHARGE-TO USERID */
@; /* HOLD THAT RECORD ! */
SKIP_REC = NO; /* NOTE: DATA READ */
END;
ELSE IF VMCRCODE = 'XX' THEN DO;
/* RECORD FORMAT WHEN CP ACCOUNT IS NOT USED */
INPUT @29 DURATION PIB4. /* LENGTH OF TIME */
UACSTUFF $CHAR8. /* WHAT WE'RE COUNTING */
@; /* HOLD THAT RECORD ! */
SKIP_REC = NO; /* NOTE: DATA READ */
END;
ELSE SKIP_REC = YES; /* NOTE: UNKNOWN RECD. */
IF NOT SKIP_REC THEN DO; /* DO MORE WORK... */
STARTTS = ENDTS - DURATION; /* START TIME */
%WRKOUT(CCC=VMC,WRK=UAC); /* WRITE THE OBS. */
END;
%MEND VMCUACC;
+-----------------+
| V M C A P D A T | Application Monitor Record Input
+-----------------+
DESCRIPTION: The VMCAPDAT exit is used to read data elements
from an application record in the VMCMXA routine.
INVOCATION: In VMCMXA, this exit is called when a domain 10
VM Monitor record (Appldata) is encountered. The macro
parameter &INFOAREA identifies the area where this exit is
invoked:
'VMX'
ACCOUNTING INTERFACE: There is no interface to CA MICS
Accounting and Chargeback.
USES: This is used to read monitor data generated by one or
more application programs in VM systems.
ELEMENTS AVAILABLE:
SYSID - System Identifier
ENDTS - The time the record was created by VM
APL_OFF - Offset to the application data area
APL_LEN - Length of the application data in bytes
USER - Userid generating the data
APL_PROD - The product ID and the release level of the
application
APL_STAT - Status flag
MRHDRDM - Monitor record domain
MRHDRRC - Monitor record type
CODING RESTRICTIONS:
This exit should not contain code that executes a LINK or
RETURN statement. A GOTO statement may only reference a
label defined within the exit.
SPECIAL NOTES: Always code a hanging '@' on the INPUT
statement(s) to hold the current record. Failure to do this
will cause the following record to be lost when the current
record is flushed by VMC.
To add new SAS data files to the DATA statement, code the
VMCUMXA exit for VM Monitor application data.
SAMPLE USER EXIT: INPUT data elements from a specific
application generated monitor record in a VM system.
%MACRO VMCAPDAT(INFOAREA);
IF &INFOAREA = 'VMX' /* VM APPLICATION */
AND APL_PROD =: '9999999' /* PRODUCT ID 9999999 */
THEN DO; /* READ THE DATA */
INPUT @APL_OFF /* POSITION CURSOR */
APLEFLD1 $CHAR8. /* INPUT FIELD 1 */
APLEFLD2 PIB4. /* INPUT FIELD 2 */
@; /* HOLD THAT RECORD ! */
%WRKOUT(CCC=VMX,WRK=APL); /* WRITE THE OBS. */
END;
%MEND VMCAPDAT;
+---------------+
| V M C U M X A | VMCMXA Data Statement File Definition
+---------------+
DESCRIPTION: The VMCUMXA exit is used to add new SAS data
files to the DATA statement of the VMCMXA routine.
INVOCATION: This exit is invoked during compilation of the
DATA statement in VMCMXA.
ACCOUNTING INTERFACE: There is no interface to CA MICS
Accounting and Chargeback.
USES: This exit may be used to add one or more installation-
defined files to the Input VM Monitor Data Phase.
ELEMENTS AVAILABLE: Not Applicable
CODING RESTRICTIONS: This macro should contain only code
that is valid on a SAS DATA statement. It should not contain
a semicolon. If a semicolon is present, a SAS 180 error will
occur.
SPECIAL NOTES: Not Applicable
SAMPLE USER EXIT: Define an intermediate file for
supplemental Monitor data:
%MACRO VMCUMXA;
%MAINWRK(CCC=VMC,WRK=UMX,KEEP=(SYSID USER ENDTS USRFLD1
USRFLD2)
%MEND VMCUMXA;
+---------------+
| V M C U M X B | VMCMXA Formats, Lengths, and Labels
+---------------+
DESCRIPTION: The VMCUMXB exit is used to provide SAS
formats, lengths, and optional labels for any new SAS data
files added to the DATA statement of the VMCMXA routine using
the %VMCUMXA macro.
INVOCATION: This exit is invoked during compilation of the
DATA statement in VMCMXA.
ACCOUNTING INTERFACE: There is no interface to CA MICS
Accounting and Chargeback.
USES: This exit may be used to provide SAS FORMAT, LENGTH
and LABEL statements for installation-defined files in the
Input Raw Monitor Data phase.
ELEMENTS AVAILABLE: Not Applicable
CODING RESTRICTIONS: This macro should not contain any
executable code.
SPECIAL NOTES: Not Applicable
SAMPLE USER EXIT: Provide formats and lengths for an
intermediate file containing supplemental Monitor data:
%MACRO VMCUMXB;
FORMAT USRFLD1 TIME8. USRFLD2 $8.;
LENGTH USRFLD1 4 USRFLD2 $8;
LABEL USRFLD1='User Field 1'
USRFLD2='User Field 2';
%MEND VMCUMXB;
+---------------+
| V M C U M X C | VMCMXA User and Custom Record Input
+---------------+
DESCRIPTION: The VMCUMXC exit is used to read data elements
from a record not defined to VMCMXA.
INVOCATION: This exit is called during the execution of the
unrecognized record routine, during the Input VM Monitor Data
phase in VMCMXA.
ACCOUNTING INTERFACE: There is no interface to CA MICS
Accounting and Chargeback.
USES: This is used to read installation-defined account
records and to output observations to installation-defined
files.
ELEMENTS AVAILABLE:
SYSID - System Identifier
MRHDRDM - Monitor record domain
MRHDRRC - Monitor record type
ENDTS - The time the record was created by VM
SKIP_REC - Drop input record
CODING RESTRICTIONS:
This exit should not contain code that executes a LINK or
RETURN statement. A GOTO statement may only reference a
label defined within the exit.
SPECIAL NOTES: Always code a hanging '@' on the INPUT
statement(s) to hold the current record. Failure to do this
will cause the following record to be lost when the current
record is flushed by VMC.
Set SKIP_REC to zero (0) to indicate that the record has been
read; otherwise, set SKIP_REC to one (1). This is used to
increment the proper record counters.
SAMPLE USER EXIT: INPUT data element from an installation-
defined monitor record.
%MACRO VMCUMXC;
IF MRHDRDM = 10 AND MRHDRRC = 1 THEN DO;
INPUT @9 USRFLD1 PIB4. /* LENGTH OF TIME */
USRFLD2 $CHAR8. /* WHAT WE'RE COUNTING */
USER $CHAR8. /* USERID */
@; /* HOLD THAT RECORD ! */
SKIP_REC = NO; /* NOTE: DATA READ */
%WRKOUT(CCC=VMX,WRK=UMX); /* WRITE THE OBS. */
END;
ELSE SKIP_REC = YES; /* NOTE: UNKNOWN RECD. */
%MEND VMCUMXC;