

3. IMPLEMENTATION › 3.2 Strategies for DB2 Accounting › 3.2.1 Implementing DB2 Accounting
3.2.1 Implementing DB2 Accounting
The following checklist will help you to implement resource
usage charges for your DB2 applications using the CA MICS DB2
Analyzer and CA MICS Accounting and Chargeback.
___ 1. Verify the account code structure and derivation
routine defined for DB2.
During the process of installing the CA MICS DB2
Analyzer, you define the account code structure and
the derivation routine that is used for the DB2DSU
file. The DB2DSU file is the basis for the DB2
Resource Accounting Journal File (ACTJDS). The
values in the account fields determine the level of
granularity available for charging and will be used
to assign cost center values for the accounting
records.
The account code structure is defined in member
sharedprefix.MICS.PARMS(DB2ACCT). The recommended
Account Code fields are:
o Authorization ID--user or application identifier
o DB2 Plan--application area
o Environment--based on the DB2 connection
identifier which usually contains the VTAM
application name
o Distributed Thread Type--Remote call indicator
The derivation routine is a SAS language routine that
assigns values to the account fields from the DB2
statistics variables. It is defined in member
sharedprefix.MICS.PARMS(DB2ACRT). It should define
the account field values as follows:
DB2ACT1=DB2AUTH;
DB2ACT2=DB2PLAN;
DB2ACT3=DB2CONN;
DB2ACT4=DB2THDTY;
Refer to Chapter 7 of the CA MICS DB2 Analyzer Guide
for additional information.
___ 2. Verify and optionally update the cost routine for
DB2.
The COSTRTE routine is SAS code that assigns values
to your installation's defined cost center variables
as each record is processed by the CA MICS system. It
is stored in member sharedprefix.MICS.PARMS(COSTRTE).
Edit the COSTRTE member and update or add code to
assign the appropriate cost center values from the
DB2ACTn fields. The ROUTINE value for DB2 data is
DYDB2FMT.
In addition to assigning the COSTCTRn values, the
code should assign a temporary variable called
ACTDB2FG a value of 1 if the DB2 statistical record
contains TCB CPU time that should be charged.
Using the recommended strategy, only remote data
requests, and CICS transactions (at older release
levels) should be charged CPU time from the DB2
statistical file.
If you are running CICS CTS Version 2.2 (or higher)
and DB2 Version 6 (or higher) then you should NOT
charge for CICS CPU time, and instead ONLY charge for
remote data request CPU time. The code should read
as follows:
IF DB2ACT4=1 THEN ACTDB2FG = 1;
ELSE ACTDB2FG = 0;
If you are running CICS CTS Version 2.1 (or earlier)
or DB2 Version 5 (or earlier), then you should charge
for both CICS CPU time and remote data request CPU
time. The code should read as follows:
IF DB2ACT3 =: 'CIC' OR DB2ACT4=1 THEN ACTDB2FG=1;
ELSE ACTDB2FG = 0;
This code can be copied from the sample COSTRTE in
sharedprefix.MICS.HOLD.PARMS.
The ACTDB2FG variable is used as a control variable
in the sample rate table for the ACTJDS DB2 journal
file, and must be assigned in COSTRTE or it will have
a missing value.
Refer to Section 4.1.3, Assigning Cost Center Values,
and Section 3.2.2, Avoiding DB2 Duplicate Charging,
for additional information.
___ 3. Update the CA MICS Accounting and Chargeback Rate
Table.
You must assign a rate to each charging element that
you wish to use for DB2 applications. The sample
rate table contains rates of 0 for computation code
1205, Class 2 TCB CPU time, based on the ACTDB2FG
control variable.
If you also want to charge DB2 users an add-on cost
for using DB2 services, you must enter another
computation code and rate as well.
The following are instructions for modifying the
sample ACTJDS rate table. This sample is copied into
your Rate Table the first time that the ACTJDS file
is selected.
o Using the MWF online panels for CA MICS Accounting
and Chargeback, select the DB2 journal file,
ACTJDS, on the Journal File Specification panel
(MWF;4;2;3;6).
o Select Option 3, Algorithm Specification, from the
File Options menu, and select the sample JDS
algorithm.
The ACTDB2FG control variable used with
computation code 1205 is the temporary variable
assigned in Step 2 that selects only CICS and
remote calls for charging. Leave the default rate
with a value of zero. Select computation code
1205 to display the Variable Value Specifications
panel and modify the 0 rate shown for value 1.
This will cause the Class 2 TCB time to be charged
only when ACTDB2FG has a value of 1.
Press END to return to the Algorithm Specification
panel.
If you wish to implement charges to DB2 users for DB2
overhead, the recommended computation code is 1212,
DSUSGPGR, the getpage buffer requests for DB2 calls.
It should be charged to all applications.
If you also want to charge DB2 resource usage, we
recommend that you use computation code 1205,
DSUTC2TM, the DB2 TCB CPU Time Consumed(Class 2).
Refer to Section 4.3.1, Defining the Rate Table, for
additional information.
___ 4. Submit the MAGRUN job to activate charging for DB2
resources.
When you END from the Rate Table Journal File
Selection panel, you will be prompted to submit the
MAGRUN batch job. Submit the job and ensure that it
completes normally to apply the changes you have made
and activate chargeback for DB2 applications.
Copyright © 2014 CA.
All rights reserved.
 
|
|