Previous Topic: 10.2.2 Parameter-Related Exits

Next Topic: Appendix A. MESSAGES

10.2.3 Output Exits


Output exits are invoked just prior to adding the observation
to the DETAIL timespan of the file.  These exits can be used
to modify the value of elements or prevent selected
observations from being added.  In addition, the CA MICS
Analyzer Option for DB2 provides two special exits to output
detail data to a user-defined data set.  These exits specify
user data set names and the length, formats, and labels
associated with the data set.
 
 
+----------------+
|  U S R S f f f |  DB2 File Selection Exit
+----------------+
 
DESCRIPTION:  The USRSfff exit provides the ability to modify
or select observations immediately prior to output.  The
files available (iiifff) are DB2DDY, DB2DDP, DB2DDU, DB2DSP,
DB2DSU, DB2DSY, DB2DSD, DB2DPP, DBPDBU, and DBPDSB.
 
INVOCATION:  These exits are invoked in the information area
processing phase immediately before output of the file.
 
ACCOUNTING INTERFACE:  No interface is provided.
 
USES:  The exit allows elements to be modified and
observations to be excluded from the output file.  To exclude
an observation, set SKIP_REC to one (1).
 
ELEMENTS AVAILABLE:  All elements in the file are available.
 
Example:
 
   sharedprefix.MICS.SOURCE(#DB2EXIT):
 
     %LET USRSDPP = PACKAGE ;
 
   prefix.MICS.USER.SOURCE(PACKAGE):
 
      IF   DB2PKNM EQ: 'ACCUMACC' THEN ;
      ELSE DB2PKNM=QPACSLOC !! QPACSCOL ;
 
In this example, DB2PKNM was redefined as a concatenation of
QPACSLOC and QPACSCOL raw SMF101-1 elements of the QPAC or
PACKAGE section.  Note that DB2PKNM is, by default, defined
by concatenating QPACLOCN, QPACCOLN, QPACPKID, and QPACCONT
variables of the QPAC section.
 
Member PACKAGE was created in the unit level
prefix.MICS.USER.SOURCE library for the unit where DB2PKNM is
to be redefined for the DB2DPP file.
 
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*                                                           *
* THIS IS IMPORTANT:                                        *
*                                                           *
* The USRSDPP exit cannot access the QPACxxxx variables     *
* unless they are made available within the following       *
* macro definition in sharedprefix.MICS.SOURCE(#DB2EXIT):   *
*                                                           *
*   %MACRO DB2QPAC;                                         *
*    /*  QPACLOCN  */                                       *
*    /*  QPACCOLN  */                                       *
*    /*  QPACPKID  */                                       *
*    /*  QPACCONT  */                                       *
*    /*  QPACSLOC  */                                       *
*    /*  QPACSCOL  */                                       *
*    /*  QPACSPKI  */                                       *
*    /*  LQPACLOC  */                                       *
*    /*  LQPACCOL  */                                       *
*    /*  LQPACPKI  */                                       *
*   %MEND DB2QPAC;                                          *
*                                                           *
* Uncomment only those variables that you need since they   *
* impose overhead on the CA MICS DAILY and Incremental      *
* updates.  The variable names and their descriptions are   *
* as follow:                                                *
*                                                           *
*   QPACLOCN  -  QPACLOCN Work Variable Long Form           *
*   QPACCOLN  -  QPACCOLN Work Variable Long Form           *
*   QPACPKID  -  QPACPKID Work Variable Long Form           *
*   QPACSLOC  -  QPACSLOC Work Variable Short Form          *
*   QPACSCOL  -  QPACSCOL Work Variable Short Form          *
*   QPACSPKI  -  QPACSPKI Work Variable Short Form          *
*   QPACCONT  -  QPACCONT Work Variable                     *
*   LQPACLOC  -  QPACLOCN Length for Long Form              *
*   LQPACCOL  -  QPACCOLN Length for Long Form              *
*   LQPACPKI  -  QPACPKID Length for Long Form              *
*                                                           *
* Those that are designated as long form are each of length *
* 128.  The last three variables are numeric variables      *
* that indicate how much of their respective long form      *
* variables are actually populated.  The long form variables*
* are available for DB2 V8.1 and above.                     *
*                                                           *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 
 
CODING RESTRICTIONS:  This exit must not issue the RETURN or
DELETE statements, nor use a subsetting IF since its
invocation assumes the entire DATA step will be executed.
Refer to the SMG, Section 4.3.1.2, for more information.
 
 
+----------------+
|  U S R D f f f |  DB2 User-written Cost Derivation Exit
+----------------+
 
DESCRIPTION:  The USRDfff exit lets you provide the
derivation of the fffCOST data element.  The files available
(fff) are the DB2DSU, DB2DDU, DB2DSP, DB2DDP, and DB2DPP
files.
 
INVOCATION:  These exits are invoked in the information area
processing phase immediately before output of the file.
 
ACCOUNTING INTERFACE:  No interface is provided.
 
USES:  The exit allows elements to be passed to the routine
computing the value of fffCOST.
 
ELEMENTS AVAILABLE:  All elements in the file are available.
 
 
+----------------+
|  U S R X f f f |  DB2 Detail Data Exit
+----------------+
 
*************************************************************
*                                                           *
*  Note:  If incremental update is active, be sure to       *
*  review the important considerations in Section 10.1.2    *
*  of this guide before coding USRXfff exits.               *
*                                                           *
*************************************************************
 
DESCRIPTION:  The USRXfff exit can be used to create a file
in the DETAIL timespan when the DETAIL timespan is inactive
on the FILE statement in sharedprefix.MICS.GENLIB(DB2GENIN).
In this case, the exit contains the entire SAS data block
that writes the DETAIL timespan for the fff file. When the
DETAIL timespan is active on the FILE statement in
sharedprefix.MICS.GENLIB(DB2GENIN), the USRXfff exit is
restricted to modifying or deleting observations in the
DETAIL timespan.  To exclude an observation, set SKIP_REC to
one (1).  In any case, the USRXfff exit is available for the
files DB2DSU, DB2DDU, DB2DSP, DB2DDP, DB2DPP, DBPDBU, and
DBPDBP.
 
INVOCATION:  This exit is invoked in the code that processes
detail DB2 transaction data after a sort of the detail data
into the detail DB2fff file sequence and before the data is
summarized to the DAYS level.
 
ACCOUNTING INTERFACE:  No interface is provided.
 
USES:  The exit allows a DETAIL timespan file to be created
when it is not coded as active on the FILE statement in the
sharedprefix.MICS.GENLIB(DB2GENIN).  In any case, the exit
allows elements to be modified and observations to be
excluded from the output file.
 
ELEMENTS AVAILABLE:  All elements in the file are available.
 
CODING RESTRICTIONS:  Refer to the System Modification Guide,
Section 4.3.1.2.
 
Example:
 
Below USRXfff exit routine excludes observations with missing
DSUREQID value:
 
  MACRO _USRXDSU
    SELECT( DSUREQID ) ;
      WHEN( MISSING( DSUREQID ) ) SKIP_REC=ONE ;
      OTHERWISE;
    END;
  %
 
+----------------+
|  U S R T f f f | DETAIL Tape Data Selection Exit
+----------------+
 
DESCRIPTION:  The USRTfff exits provide access to DETAIL file
records prior to their output to DETAIL tape data sets.
Refer to Chapter 7 of this guide for information about DETAIL
tape processing and a list of eligible component files.
 
INVOCATION:  The USRTfff exit is invoked prior to output to
DETAIL tape files.
 
ACCOUNTING INTERFACE:  No interface is provided.
 
USES:  Use this exit to limit the amount of data that is
written to DETAIL tape files, or to modify the contents of
data elements written to DETAIL tape files.  Note that
USRTfff exit code only affects the DETAIL tape file content
for a particular file (fff). It has no impact on the normal
unit database content for the same file (fff).
 
ELEMENTS AVAILABLE:  All elements in the DETAIL timespan of
the file.
 
ACTIVATION:  The USRTfff exits are invoked using the indirect
exit convention described in Section 4.3.1.2 of the SMG.
 
All of the USRTfff indirect exits are activated in
sharedprefix.MICS.SOURCE(#cccEXIT).  In #cccEXIT, you will
find the following statement for each file (fff) eligible for
DETAIL tape:
 
    %LET USRTfff = ;
 
The exit is activated by providing a member name to the right
of the equal sign:
 
    %LET USRTfff = exitname ;
 
If you code an exitname, you MUST create a member in each
unit's prefix.MICS.USER.SOURCE library with that name.
Provide valid SAS code in the member.  This code will be
invoked prior to the output of records to the DETAIL tape
file.
 
Example:
 
   sharedprefix.MICS.SOURCE(#DB2EXIT):
 
     %LET USRTDSU = DSUTEXIT ;
 
   prefix.MICS.USER.SOURCE(DSUTEXIT):
 
     IF DB2ID NE 'RGN1' THEN SKIP_REC=1 ;
 
In this example, DSUTEXIT was chosen as the name for the
DETAIL tape exit for the DB2DSU file.  Member DSUTEXIT was
created in the unit level prefix.MICS.USER.SOURCE library for
each unit where DETAIL tape was activated for the DB2DSU
file.
 
The exit was coded to limit the records written to the DETAIL
tape file to those from a particular DB2 region, RGN1.
 
Note that the exit member name must be identical in each
unit's prefix.MICS.USER.SOURCE library, but the contents of
each member can be different (or identical) for each unit.
 
CODING RESTRICTIONS:  Ensure that you have activated DETAIL
tape processing for a file, and executed cccPGEN prior to
activating and coding USRTfff exits.
 
 
 
+----------------+
|  U S R U J f f |  Accounting & Chargeback Exits
|  D B 2 J f f f |
+----------------+
 
DESCRIPTION:  These exits provide the linkage into CA MICS
Accounting and Chargeback.  The files available (fff) are the
DB2DSU, DB2DDU, and DB2DPP files.
 
INVOCATION:  These exits are invoked in the daily
summarization #fffDSUM routines, where fff is DSU, DDU, or
DPP as the data is summarized at the DAYS timespan.
 
ACCOUNTING INTERFACE:  These exits provide the interface to
Accounting and Chargeback.
 
USES:  The exit allows elements to be passed to Accounting
and Chargeback.
 
ELEMENTS AVAILABLE:  All elements in the file are available.
 
CODING RESTRICTIONS:  Refer to Section 4.3.1.1 of the SMG.