Previous Topic: 3.9 Avoiding VSE/POWER Duplicate ChargingNext Topic: 3.11 Implementing Web Accounting


3.10 Implementing MQSeries Accounting


CA MICS Accounting and Chargeback supports the following
CA MICS MQSeries Analyzer files for chargeback processing:

   * MQSeries Message Manager Accounting (MQAMMA) file
   * MQSeries Task Accounting (MQATAA) file
   * MQSeries Queue Activity (MQAQAA) file
   * MQSeries Message Flow Accounting (MQBMFA) file

 * - Available only after WebSphere MQ Version 5 Release 2

All CA MICS MQSeries analyzer files are produced from SMF
records generated by IBM's WebSphere MQ (MQSeries)
messaging system.

The Message Manager Accounting (MQAMMA) file is derived from
the SMF type 116 subtype 0 record.

The Task Accounting (MQATAA) file is derived from the SMF
type 116 subtype 1 and 2 (continuation) records.  The MQATAA
file provides accounting information on individual
application usage.

The Queue Activity (MQAQAA) file is derived from the Queue
segments of SMF type 116 subtype 1 and 2 (continuation)
records.  The MQAQAA file provides information on activity
within individual WebSphere MQ queues.

The Message Flow Accounting (MQBMFA) file is derived from the
SMF type 117 record (subtypes 1 and 2).  The MQBMFA file
provides Message Broker statistics on message flow execution.

CA MICS Accounting and Chargeback allows you to bill from any
of these files.  These three resource files contain the same
resource utilization information, but at different levels of
detail and from different perspectives.

For example, both the MQAMMA and MQATAA files are task
oriented--but are generated based on different trace levels
set for WebSphere MQ accounting.  The SMF record used to
build the MQATAA file is more detailed than the one used to
build the MQAMMA file.

The MQAQAA file is queue oriented--the resource utilization
is attributable to a particular WebSphere MQ queue that may
have been used by many different tasks.

The CA MICS Accounting and Chargeback journal files
associated with these MQSeries Analyzer files are:

  MQSeries  MACT      Journal
  Analyzer  Journal   File
  File      File      Label
  --------  --------  -------------------------------------
  MQAMMA    ACTJMQ    MQSeries Message Manager Journal File
  MQATAA    ACTJTA    MQSeries Task Accounting Journal File
  MQAQAA    ACTJQA    MQSeries Queue Activity Journal File
  MQBMFA    ACTJMF    MQSeries Message Flow Accounting
                      Journal File

Both the MQAMMA and MQATAA files contain task level
information, however, the MQAMMA file is lower volume than
the MQATAA file.  If the MQAMMA file contains resource
utilization information suitable for your site, you should
use the corresponding ACTJMQ journal file for chargeback
purposes.  This will result in faster processing due to the
lower record volume.

The following checklist will help you to implement usage
charges for your MQSeries activity using the CA MICS MQSeries
Analyzer and CA MICS Accounting and Chargeback. The CA MICS
MQSeries Analyzer and CA MICS Accounting and Chargeback must
be installed before performing these steps.


___ 1.  Verify the account code structure and derivation
        routine defined for MQSeries.

        MQSACCT
        -------
        The account code structure is defined in member
        sharedprefix.MICS.PARMS(MQSACCT).  The recommended
        Account Code fields are:

        o  Type Of Connection

        o  Connection Name

        o  Task name/User ID/Channel Name

        Changes to the MQSACCT account code structure
        definition, however, do require product regeneration
        using the sharedprefix.MICS.CNTL(MQSCGEN) job.

        MQSACRT
        -------
        The account code derivation routine is defined in
        sharedprefix.MICS.PARMS(MQSACRT).  The derivation
        routine is coded in the SAS language and assigns
        values to the account fields (MQSACT1-MQSACTn) based
        on the contents of identification type data elements
        such as MQSATYP, MQSCONNM, and MQSUSID.

        Please refer to the sample code in
        sharedprefix.MICS.HOLD.PARMS(MQSACRT) for an example
        of account field assignment.

        Note that changes to the MQSACRT account code
        derivation routine do not require product generation
        to take effect.

        Refer to Chapter 7 of the CA MICS MQSeries Analyzer
        Guide for additional information about the account
        code definition and derivation routines.


___ 2.  Update the cost routine for MQSeries data.

        The COSTRTE routine is SAS code used to assign values
        to your installation's defined cost center variables
        as each record is processed by the CA MICS system.
        It is defined in member
        sharedprefix.MICS.PARMS(COSTRTE).

        The COSTRTE member in sharedprefix.MICS.HOLD.PARMS
        includes sample code to assign cost centers for
        MQSeries data.  The information available for use in
        cost center assignment is different based on the
        connecting system type.  Additionally, decisions on
        whether or not to charge for CPU time may be based on
        connecting system type.

        The sample COSTRTE member in
        sharedprefix.MICS.HOLD.PARMS sets a single data
        element, ACTMQSFG, to one (1) if CPU charges should
        be incurred and zero (0) if not.  The sample avoids
        (sets ACTMQSFG to 0) charges when the connecting
        address space is batch, TSO, or IMS.

        You might need to modify the code that assigns values
        to ACTMQSFG depending on whether charges are made to
        another journal file or not.  Also, CICS was not part
        of the original sample.  However, beginning with
        CICS/TS 3.2, charges applied to CSUCPUTM, CSUCPRTM,
        or CSUTCBTM are also applied to MMACPUTM, TAACPUTM,
        QAAQCPTM, and MFACTM on the MQSeries side. Therefore,
        one might need to add a check for MQSATYP to the IF
        statement as in:

        IF MQSATYP=1 OR MQSATYP=2 OR MQSATYP=3 OR MQSATYP=4
        THEN ACTMQSFG=0;
        ELSE ACTMQSFG=1;

        This is also explained under the title "How to Avoid
        Duplicate Charging" in section 3.7.2.

        Edit the COSTRTE member in sharedprefix.MICS.PARMS
        and update or add code to correctly assign the
        MQSeries cost center variables for your installation.
        The ROUTINE value for the MQSeries data is DYMQSFMT.

        Refer to Sections 4.1.3, Assigning Cost Center
        Values, and 3.7.2, Avoiding MQSeries Duplicate
        Charging, for additional information.


___ 3.  Define qualification group(s).

        If you will be charging for many systems in the same
        way, define one or more Sysid qualification groups,
        each containing the Sysids to be charged by a single
        algorithm (an algorithm is a set of charging elements
        and associated rates).

           Use the Algorithm Qualification Worksheet in
           Section 4.3.1.5.1 to identify which groups are to
           be used for a given algorithm.  Enter this
           information on the Algorithm Qualification panel
           (MWF;4;2;3;6;4).

           Select Option 9, Qualification Groups, on the
           Parameter Specifications menu (MWF;4;2;3;9) to
           display the Group Selection panel.  Use the Insert
           and Delete line commands to add or delete
           Qualification Group IDs.  Use the Select line
           command to enter the values that comprise a group.

           Submit the job CHRGROUP from
           sharedprefix.MICS.CNTL.  If you made any changes,
           you are automatically asked to submit this job
           when you END from the Group Selection panel.

___ 4.  Update the CA MICS Accounting and Chargeback Rate
        Table to define your MQSeries charging strategy.

        You must define rates for each charging element that
        you wish to use for MQSeries chargeback.  The
        recommended computation codes are:

            MQSeries Message Manager Journal (ACTJMQ).
              - Comp codes: 2702 and 2712

            MQSeries Task Accounting Journal (ACTJTA).
              - Comp codes: 2730, 2731 and 2732

            MQSeries Queue Activity Journal File (ACTJQA).
              - Comp codes: 2736, 2737 and 2738

            MQSeries Message Flow Accounting Journal File
                (ACTJMF).
              - Comp codes: 2740 and 2741

        Use algorithm qualification to specify the work to be
        charged by each algorithm if either of the following
        is true.

        o  You wish to charge for only selected systems or
           connection types or regions from a single
           algorithm.

        o  You have defined more than one algorithm for the a
           journal file.  You might need multiple algorithms
           if you charge differently based on system or
           connection type or region-id.

        On the Algorithm Qualification panel, use the
        qualification group name(s) defined in Step 2 to
        simplify data entry.

        Refer to Section 4.3.1, Defining the Rate Table, for
        additional information.

___ 5.  Submit the MAGRUN job to activate charging for
        MQSeries resources.

        When you finish editing the rate table as directed in
        Step 3, you will be prompted to submit the MAGRUN
        batch job.  Submit the job and ensure that it
        completes normally to apply the changes and activate
        charging for your MQSeries activity.