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 an observation
to the DETAIL timespan of a file.  Use these exits to modify
the value of elements or prevent selected observations from
being added to a file.  In addition, the CA MICS Analyzer
Option for CICS 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 |  CICS File Selection Exit
+----------------+

DESCRIPTION:  The USRSfff exit lets you modify or select
observations immediately prior to output. For the CIC
Information Area, the files available (fff) are CSY, CSW,
CSU, CSF, CAU, CAC, CIN, and CDC. For the CTG Information
Area, the file available is GSA.

INVOCATION:  These exits are invoked in the information area
processing phase immediately before output of the file.  See
Chapter 9 for more information.

ACCOUNTING INTERFACE:  No interface is provided.

USES:  Use this exit to modify elements or to exclude
observations from further processing.  For files CSY, CSF,
CIN and GSA, the USRSfff exit is called early enough to
modify elements or delete observations at the DETAIL level.

One cannot use _USRSfff to make changes in the DETAIL
timespan for any of these files:  CAC, CAU, or CSU.  However,
since the CSW work file feeds each of these files and the
_USRSCSW exit is applied to DETAIL level observations early,
we suggest that any modifications to elements or any deletion
of DETAIL level observations be made in the _USRSCSW exit.
See the SPECIAL NOTES for details.

ELEMENTS AVAILABLE:  All elements in the file are available.

CODING RESTRICTIONS:  See section 4.3.1 of the System
Modification Guide.

SPECIAL NOTES:

1. To implement this exit at the complex level, code it in
   sharedprefix.MICS.SOURCE(#CICEXIT).

2. To implement this exit at the unit level, code it in
   prefix.MICS.USER.SOURCE(#CICEXIT).

3. The USRSCSW exit is called as the CICCSW work file is
   being defined.  This is the best place to insert user code
   that sets values for elements.  Also you can code an
   expression that sets SKIP_REC to 1 so that a particular
   observation will not be written to the CSW work file.
   Observations not written to CSW will not be available to
   the CAC, CSU, or CAU files in any timespans.  In the
   following example, no observations with CICSID other than
   CIC1 will reach the CAC, CSU, and CAU files.

   MACRO _USRSCSW
     IF CICSID NE "CIC1" THEN SKIP_REC=ONE;
     %

4. For files CAC, CSU, and CAU, the _USRSfff macro can be
   used to modify or define DETAIL level element values just
   before they are summarized to the DAYS level.

5. Since the _USRDCAC and _USRDCSU exits are called just
   before output to the DAYS timespan for the CAC and CSU
   files, observations can be omitted from the DAYS timespan
   for the CAC and CSU files by inserting code into _USRDCAC
   or _USRDCSU as in the following examples:

   MACRO _USRDCAC
     IF CICSID NE "SYS1" THEN SKIP_REC=ONE;
     _USRUCAC
     _USRUJCA
     %

   MACRO _USRDCSU
     IF CICSID NE "SYS1" THEN SKIP_REC=ONE;
     _USRUCSU
     _USRUJCS
     %

   A _USRDfff call like this has no impact on the DETAIL file
   itself whether it is on DASD or on tape.  The _USRDfff
   exit is described below.

6. If you take the TAPECSU option for the CSU file, you can
   use the USRTCSU exit to change element values or to
   prevent observations before being written to the
   TAPECSU.CICCSU01 file.  USRTCSU is described below.


+----------------+
|  U S R D f f f |  CICS User-written Cost Derivation Exit
+----------------+

DESCRIPTION:  The USRDfff exit lets you derive the fffCOST
data element.  The files available (fff) are CSU and CAC.

INVOCATION:  These exits are invoked in the information area
processing phase immediately before output of the file.  See
Chapter 9 for more information.

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.

CODING RESTRICTIONS:  See section 4.3.1 of the System
Modification Guide.


+----------------+
|  U S R X f f f |  CICS Detail Data Exit
+----------------+

DESCRIPTION:  The USRXfff exit creates a DETAIL timespan file
for files that do not support the DETAIL timespan by default
(due to the large volume of transaction data at most sites).
The files available (fff) are CICS CSU, CAU, CAC, and CSF.

INVOCATION:  This exit is invoked in the code that processes
detail CICS transaction data after a sort of the detail data
into the DETAIL CICfff file sequence and before the data is
summarized to the DAYS level.

ACCOUNTING INTERFACE:  No interface is provided.

USES:  Use this exit to create a DETAIL timespan file. If you
choose to create a DETAIL timespan file for the CICCSU file
on tape rather than on DASD, use the USRTCSU exit.  See
section 10.1.4 for coding examples.

ELEMENTS AVAILABLE:  All elements in the file are available.

CODING RESTRICTIONS:  See section 4.3.1 of the System
Modification Guide.


+----------------+
|  U S R S D K P |  User Data Set Keep Exit
+----------------+

DESCRIPTION:  The USRSDKP exit defines user data sets to
create during CICS input file processing.

INVOCATION:  The exit is invoked as part of the DATA
statement that defines the data sets to be created during
the initial processing of the CICS input files.

ACCOUNTING INTERFACE:  No interface is provided.

USES:  Use this exit to create additional SAS data sets
during the initial processing of CICS input files.  For
example, you can use it to define your own output data sets
for the accounting or exception class of the CICS monitoring
data.

ELEMENTS AVAILABLE:  All elements in the file are available.

CODING RESTRICTIONS:  To code the exit, specify the SAS data
set name to be created.  For example, to create data sets
named CICEXP and CICACT in the DETAIL database, code the
following:

   MACRO _USRSDKP
    &CICX..CICEXP(KEEP=variable names)
    &CICX..CICACT(KEEP=variable names)
   %

Do not include a semicolon (;) at the end of the data set
names.

To output observations to the files defined by the _USRSDKP
exit, you can use any of the detail exits available during
input processing, such as _USRSCSW, CICRLRT, and CICAURT.


+----------------+
|  U S R S L F L |  User Data Length, Format, Label Exit
+----------------+

DESCRIPTION:  The USRSLFL exit defines the length, formats,
and labels associated with a user data set created during the
initial processing of CICS input files.  It is used in
conjunction with the USRSDKP exit described above.

INVOCATION:  The exit is invoked during the code that
processes the CICS input files.

ACCOUNTING INTERFACE:  No interface is provided.

USES:  Use this exit to specify the length, formats, and
labels for variables associated with a user-defined data set.

ELEMENTS AVAILABLE:  All elements in the file are available.

CODING RESTRICTIONS:  To code the exit, specify the LENGTH,
FORMAT, and LABEL statements for the variables in the KEEP
list as defined by the USRSDKP exit.  For example:

   MACRO _USRSLFL
   LENGTH var1 var2 var3 8;
   FORMAT var1 var2 var3 8.2;
   LABEL var1 = "Exception Label 1"
         var2 = "Exception Label 2"
         var3 = "Exception Label 3";
   %


+----------------+
|  U S R S C M F | CMF Accounting & Exception Data Processing
+----------------+

DESCRIPTION:  The USRSCMF exit serves two purposes. It can
build CICS files in the CA MICS database using the CMF
accounting and exception class transaction records.  It can
also be used to output performance class data to SAS files
that you have defined in the USRSDKP exit.

INVOCATION:  The USRSCMF exit is invoked for each transaction
record input from the CMF accounting or exception class.  The
exit is invoked after the fields from these records have been
processed by the input format routine.  As a result, do not
code a SAS INPUT statement in this exit.

This exit is also invoked for each transaction and global
record input from the CMF performance class, which lets you
manipulate the fields read from the CMF records and
optionally output them to your own SAS file.

ACCOUNTING INTERFACE:  No interface is provided.

USES:  Use this exit to build your own CICS files or to add
observations to the CA MICS CICS files using CMF accounting,
exception, and performance class data.

ELEMENTS AVAILABLE:  All data fields in the accounting,
exception, and performance class data.   See
sharedprefix.MICS.SOURCE(CICDEPEL) for the corresponding SAS
variable names.

CODING RESTRICTIONS:  Do not code SAS INPUT statement in this
exit, because the exit is invoked after each field in the
record has been read.  Since this exit is invoked for all
classes of CMF data, you must check the temporary variable
CMFRTYPE to determine the record type.  The following shows
the value of CMFRTYPE for each CMF record type:

  Record Type                           CMFRTYPE
-----------------------------------         -
Accounting class transaction record         A
Exception class transaction record          E
Performance class global record             G
Performance class transaction record        T

The following example shows how to write to the CICCIN file
when you have identified that a file is waiting for a VSAM
buffer.

   MACRO _USRSCMF
    SELECT (CMFRTYPE);
      WHEN ('E') DO;
        IF FCVSBWNM NE ' ' THEN DO;
          CINCODE=91;
          CINTEXT=FCVSBWNM || ' WAITING FOR A VSAM BUFFER';
          OUTCICFL='OUTCIN';
          LINK OUTCIN;
        END;
      END;
      OTHERWISE;
    END;
   %


+----------------+
|  U S R S I N T |  User Specified Initialization Exit
+----------------+

DESCRIPTION:  The USRSINT exit lets you initialize CA MICS
data elements that become unique to specific regions as a
result of CMF customization performed at your site.  This
initialization logic prevents data propagation that can occur
under certain conditions in CA MICS.  For example, to help
reduce system overhead in your production regions, you tailor
CMF to exclude a set of monitoring fields.  However, the test
region continues to collect all CMF fields.  When the data
from the test region is processed in CA MICS followed by data
from the production regions, you noticed elements in the
production regions for the excluded fields contain values
from the test region.  To resolve this problem, you must
initialize data elements for the excluded fields in the
USRSINT exit.

INVOCATION:  The exit is invoked during the initialization
module CICINIT that is executed for fields that are normally
unique to each CICS input source.

ACCOUNTING INTERFACE:  No interface is provided.

USES:  Use this exit to set a CA MICS data element to either
missing or blanks based on the data element format.  The
purpose of the exit is to prevent data propagation for fields
that have been excluded from selected regions as a result of
CMF customization.

ELEMENTS AVAILABLE:  All elements in the CICCSU and CICCSY
files at the DETAIL timespan are available.  You can browse
sharedprefix.MICS.GENLIB(CICGENIN) for the list of data
elements.

CODING RESTRICTIONS:  To code the exit, assign data elements
to either missing or blanks based on element format.  The
data elements coded in this exit should be populated directly
from input fields.  They should not be elements that are
derived from either CICS source modules or the %fffDERV
macro, since the latter derivations override any code
specified here.  An example of the exit is shown below:

  %MACRO USRSINT;
   CSUSIOCT=.;
   CSUFACTY=' ';
  %MEND USRSINT;


+----------------+
|  U S R S T A T |
+----------------+

DESCRIPTION:  The USRSTAT exit lets you selectively copy CICS
statistics records to a sequential file on tape during the
daily summarization process.  The sequential file can then be
used as input for statistics report programs, as IBM's
DFHSTUP, without processing the entire SMF data set.

INVOCATION:  The USRSTAT exit is invoked prior to output of
the sequential file.

ACCOUNTING INTERFACE:  No interface is provided.

USES:  Use this exit to select the statistics record types or
the CICS regions for which data is to be written to the
sequential file.

ELEMENTS AVAILABLE:  All data fields in the input records
processed by the CA MICS Analyzer Option for CICS, plus the
temporary numeric variable RECNUM, which indicates the
statistics record type.

CODING RESTRICTIONS:  Verify that the STATCOPY keyword is
specified in your prefix.MICS.PARMS(CICOPS) and that CICPGEN
has been executed before coding this exit.

Set SKIP_REC to 1 to exclude records from being written to
the sequential file.

For example, code the following to limit output written to
the sequential file to include data about storage manager
task subpools (type 8), storage manager dynamic storage areas
(type 9), and loader statistics (type 27):

   %MACRO USRSTAT;
     IF RECNUM = 8 OR RECNUM = 9 OR RECNUM = 27
      THEN SKIP_REC=0;
      ELSE SKIP_REC=1;
   %MEND USRSTAT;


+----------------+
|  U S R T C S U | TAPECSU Data Selection Exit
+----------------+

DESCRIPTION:  The USRTCSU exit selects data by CICSID or
other criteria before the DETAIL CICCSU01 file is written to
tape during the daily summarization process.

INVOCATION:  The USRTCSU exit is invoked prior to output of
the TAPECSU.CICCSU01 file in SOURCE(#CSUDSUM).

ACCOUNTING INTERFACE:  No interface is provided.

USES:  Use this exit to limit the amount of data that is
written to the TAPECSU.CICCSU01 file.

ELEMENTS AVAILABLE:  All elements in the DETAIL CICCSU01
file.

CODING RESTRICTIONS:  Verify that the TAPECSU keyword is
specified in your prefix.MICS.PARMS(CICOPS) and that CICPGEN
has been executed before coding this exit.

For example, code the following to limit output written to
the TAPECSU.CICCSU01 file by excluding data about all CICS
regions other than CIC1 and CICP.

   %MACRO USRTCSU;
     IF CICSID NE 'CIC1' AND CICSID NE 'CICP' THEN
      SKIP_REC=1;
   %MEND USRTCSU;


+----------------+
|  U S R U J f f |  Accounting & Chargeback Exits
|  C I C J f f f |
+----------------+

DESCRIPTION:  These exits provide the linkage into the CA
MICS Accounting and Chargeback Option.  The files available
(fff) are the CICCSU and CICCAC files.

INVOCATION:  These exits are invoked in the daily
summarization #fffDSUM routines, where fff is CSU or CAC,
because the data is summarized at the DAYS timespan.

ACCOUNTING INTERFACE:  These exits provide the interface to
the CA MICS Accounting and Chargeback Option.

USES:  The exit allows elements to be passed to the CA MICS
Accounting and Chargeback Option.

ELEMENTS AVAILABLE:  All elements in the file are available.

CODING RESTRICTIONS:  See section 4.3.1 of the System
Modification Guide.