Previous Topic: 7.3 Unit-Level ParametersNext Topic: 7.3.2 IMS Application Unit Definition


7.3.1 Code the IMS Relative Longevity Code Exit (IMSRLRT)

The CA MICS IMS Analyzer requires that you write an exit to
assign a relative longevity code to each transaction as the
transaction data is processed.  The exit must be written in
SAS and stored in prefix.MICS.PARMS(IMSRLRT).  It assigns a
value to the CA MICS data element TRANTYPE. A secondary
function of this exit is to reset any response time data
element in the transaction detail record according to
site-dependent algorithms.

SETTING THE VALUE OF TRANTYPE

TRANTYPE is a 1-character field and will be set to S, M, L,
C, or X for short, medium, long, conversational, or
excessive, respectively.  The existence of this code allows
CA MICS to maintain separate response distributions for each
type of transaction.

There are several approaches you might take to setting this
code, including:

   o  Classification based on estimated resource usage

      This approach is more aligned to the resource
      management concepts associated with the MVS System
      Resource Manager, and classifies a transaction based on
      the transaction's resource consumption.

   o  Classification based on transaction identification

      Normally, this approach utilizes a table lookup of IMS
      transaction IDs to group the work.  For example,
      transactions ABCD and WXYZ are always long
      transactions, while other transactions may be medium or
      short.

      Note that type 1 records for data created by the IMS
      FORMAT command do not contain a transaction identifier.
      Review the information about the FORMAT statement in
      the IMSOPS section of this chapter for more information
      about using data created by the IMS FORMAT command.

   o  Classification based on facility area

      This approach classifies work based on the service area
      exercised.  For example, all transactions that execute
      as destination-attached may be of medium duration.

The relative longevity code routine is written in SAS.  The
testing and accuracy of modifications to the routine supplied
on the distribution libraries is the responsibility of the
user.  The worksheet for coding the Relative Longevity Code
Exit is shown in Figure 7-4.

When invalid input makes the proper assignment of the
relative longevity code impossible, a default code, usually L
(long), should be assigned.  Failure to do this will
significantly reduce the usability of the transaction group
response time statistics.

RESPONSE TIME RECALCULATIONS

Some sites may find that the algorithms used by the IMS
Analyzer to calculate response-oriented data elements may not
reflect unusual configurations or reporting requirements.  If
response data elements, such as ISUTRANS, ISUTRSTM, ISURESTM,
or any related data elements are candidates for modification,
those data elements (or any others in the detail transaction
work file record) may be modified by logic included in this
exit routine.  See Section 7.1 and Appendix B of this guide
for more information.

Such logic typically recalculates response-oriented data
elements based on different algorithms than those used by the
distributed IMS Analyzer code for non-BMC MAINVIEW for IMS
Online and non-Fastpath (non-EMHB-scheduled) transactions.
The new algorithms usually differ for program-switched
transactions.

The distributed algorithms for non-BMC MAINVIEW for IMS
Online and non-EMHB transactions calculate response time as
follows:

      Response time, transaction B (ISUTRSTM)
    |<--------------------------------------------->|
    |                                               |
    |Input queue time, transaction B                |
    |(ISUTMQIN)                                     |
    |<----------------------------->|               |
    |                               |               |
    |Input queue                    |               |
    |time, tran A                   |               |
    |(ISUTMQIN)                     |               |
    |<---------->|                  |               |
    |            |                  |               |
    --------------------------------------------------time->
A:  01 35S (08)  31   03      31D/07|               |
                      |             |               |
B:  ................  +-> 35S  (08) 31D  03  ...    | 31D/07
                                         |          |
                                         +->  35C   31C .. 36

where the terminal user enters a transaction input message
that is processed by transaction A, which switches to
transaction B.  Transaction B produces a final output
message sent back to the originating terminal.

For transaction A, the following data elements are set on
entry to the IMSRLRT exit logic:

    LOG  DATA      CONTENTS
    REC  ELEMENT
    ---  --------  ------------------------------------------
    01   TRANINTS  Input message timestamp
    35S  TRAN35TS  Timestamp of enqueue of input message on
                   SMB for transaction A
         TRAN35T2  Timestamp of enqueue of input message on
                   SMB for transaction A
   (08)  TRAN08TS  Schedule timestamp for transaction A
    31D  STARTTS   Timestamp of the initial Get Unique (GU)
                   issued to retrieve an input message from
                   the Message Queue
    03   (N/A)     (Input message)
    31D  ENDTS     Timestamp of either the initial GU issued
                   by transaction A (31D) or end of schedule
                   for transaction A (07)
    35C  TRANOQTS  (SAS missing value)
    31C  TRANC31   (SAS missing value)
    36   TRANOPTS  (SAS missing value)
    N/A  TRANSWFR  ID of the PARENT transaction, whose value
                   is blank (transaction A was not switched
                   to)
    N/A  ALTTRAN   ID of the CHILD transaction, whose value
                   is B (transaction A switched to
                   transaction B)
    N/A  ISURESTM  Transaction residency time, whose value
                   is ENDTS - STARTTS
    N/A  ISUTMQIN  Input queue time, to be STARTTS - TRANINTS
                   if the input message timestamp is
                   available and correct.   If it is
                   incorrect, for example, from an MSC
                   transaction, the value is set to STARTTS -
                   TRAN35TS
    N/A  ISUTRSTM  Transaction response time, set to SAS
                   missing value (transaction had no output
                   message)
    N/A  ISUTRANS  Response event count, set to a value of 0
                   (no response event occurred)
    N/A  ISUUOWCT  Unit of work count, set to a value of 1
                   (one unit of work was done)

For transaction B, the following data elements are set on
entry to the IMSRLRT exit logic:

    LOG  DATA      CONTENTS
    REC  ELEMENT
    ---  --------  ------------------------------------------
    03   TRANINTS  Timestamp of input message for transaction
                   A
         TRAN35TS  Timestamp  of  enqueue of input message on
                   SMB for transaction A
    35S  TRAN35T2  Timestamp of enqueue of input message on
                   SMB for transaction B
   (08)  TRAN08TS  Schedule timestamp for transaction B
    31D  STARTTS   GU timestamp of input message from queue
    03   (N/A)     (Input message timestamp is on output
                   message log record)
    31D ENDTS      Timestamp of GU of next input message from
                   queue for transaction B (31D), or end of
                   schedule for transaction B (07)
    35C  TRANOQTS  Enqueue of output message on destination
                   CNT
    31C  TRANC31   GU of output message by communications
    36   TRANOPTS  Output message purge (may be very much
                   later than the time of output message GU)
   01/03 TRANIMSG  Number of messages input to the
                   transaction

    N/A  TRANSWFR  ID of the PARENT transaction, whose value
                   is A (transaction A switched to this
                   transaction)
    N/A  ALTTRAN   ID of the CHILD transaction, whose value
                   is blank (transaction B did not switch to
                   another transaction)
    N/A  ISURESTM  Transaction residency time, whose value
                   is ENDTS - STARTTS
    N/A  ISUTMQIN  Input queue time, to be STARTTS - TRANINTS
                   if the input message timestamp is
                   available and correct.   If it is
                   incorrect, for example, from an MSC
                   transaction, the value is set to STARTTS -
                   TRAN35TS
    N/A  ISUTRSTM  Transaction response time, set to the
                   value TRANC31 - STARTTS + ISUTMQIN
    N/A  ISUTRANS  Response event count, set to the value 1
                   (one response event occurred)
    N/A  ISUUOWCT  Unit of work count, set to the value 1
                   (one unit of work was done)

The two transaction records made by the standard IMS Analyzer
algorithms will represent what the terminal user sees as a
single interaction.  The response time for that interaction
is carried with the last transaction in the chain,
transaction B, and is the difference between the time the
input message entered the IMS message queue and the time the
output message was retrieved for output.  Transaction A has
no response time and is marked as not being a response event,
so it does not enter into response time calculations.

If you put no response time recalculations in the IMSRLRT
exit, the response time values shown above will be used in
the IMS database.

If you install logic into the IMSRLRT exit to recalculate
response time data element values, you must be familiar with
the material in this section, with any IMS service agreements
in place at your site, and with SAS coding.

One method of recalculation changes only the value of the
input queue time, ISUTMQIN, for transactions in a program
switch chain.  This diagram shows the change:

      Response time, transaction B (ISUTRSTM)
    |<--------------------------------------------->|
    |                                               |
    |Input queue          input queue               |
    |time, tran A         time, tran A              |
    |(ISUTMQIN)           (ISUTMQIN)                |
    |<---------->|       |<-------->|               |
    |            |       |          |               |
    --------------------------------------------------time->
A:  01 35S (08)  31  03  |    31d/07|               |
                     |   |          |               |
B:  ...............  +-> 35S   (08) 31D  03  ...    | 31D/07
                                         |          |
                                         +->  35C   31C .. 36

The code necessary to make this change is illustrated in a
distributed sample IMSRLRT exit.  This sample is found in
sharedprefix.MICS.HOLD.PARMS(IMSRLRT1).  If you choose to use
this template, do not modify that copy.  Copy the sample into
the prefix.MICS.PARMS(IMSRLRT) in your test database unit
and modify it to your specifications.  Test for the desired
results before installing the exit into your production IMS
database unit.

Another method of recalculation changes the values of input
queue time, ISUTMQIN, and response time, ISUTRSTM, for the
transactions in a program switch chain.  This method
recalculates response time for transactions in a program
switch chain that produces terminal output, and input queue
time for all transactions in the chain.  This diagram shows
the change:


                           response time,
                           transaction B
                           (ISUTRSTM)
                         |<------------------------>|
                         |                          |
     Input queue         |input queue               |
     time, tran A        |time, tran A              |
     (ISUTMQIN)          |(isutmqin)                |
    |<---------->|       |<-------->|               |
    |            |       |          |               |
    --------------------------------------------------time->
A:  01 35S (08)  31  03  |    31d/07|               |
                     |   |          |               |
B:  ...............  +-> 35S   (08) 31D  03  ...    | 31D/07
                                         |          |
                                         +->  35C   31C .. 36

The code necessary to make this change is illustrated in a
distributed sample IMSRLRT exit, found in
sharedprefix.MICS.HOLD.PARMS(IMSRLRT2).  If you choose to use
this template, do not modify that copy.  Copy the sample into
the prefix.MICS.PARMS(IMSRLRT) in your test database unit
and modify it to your specifications.  Test for the desired
results before installing the exit into your production IMS
database unit.


The example in sharedprefix.MICS.HOLD.PARMS(IMSRLRT3)
calculates response time using an algorithm distributed
before PSP8810 (product change IMS4300).  This algorithm is
NOT recommended for new installations.  If you choose to use
this template, do not modify that copy.  Copy the sample into
the prefix.MICS.PARMS(IMSRLRT) in your test database unit
and modify it to your specifications.  Test for the desired
results before installing the exit into your production IMS
database unit.

The following example shows the calculation of relative
longevity code based on a grouping of transaction IDs.
Certain transaction IDs are considered short, conversational,
or medium duration.  All transaction IDs not specifically
listed default to long.



* ABC'S  IMS RELATIVE LONGEVITY CODE DERIVATION ROUTINE
*
*
   ;
*
* THE FOLLOWING TRANSACTIONS WILL BE CLASSIFIED AS
* CONVERSATIONAL:
*
* TRANSID  APPLICATION
*  ----    ----------------------------------------
*  AUTH    APPLICATION AUTHORIZATION FUNCTION
*  RBAL    DEMAND DEPOSIT ACCOUNT BALANCE INQUIRY
*  TBAL    TIME DEPOSIT ACCOUNT BALANCE INQUIRY
*  UPAY    ADMINISTRATIVE PAYROLL FILE UPDATE
*
   ;
    IF
      TRANSACT = :'AUTH' OR TRANSACT = :'RBAL' OR
      TRANSACT = :'TBAL' OR TRANSACT = :'UPAY'
    THEN TRANTYPE = 'C';
*
* THE FOLLOWING TRANSACTIONS WILL BE CLASSIFIED AS
* SHORT:
*
* TRANSID  APPLICATION
*  ----    ----------------------------------------
*  RINQ    DEMAND DEPOSIT ACCOUNT VERIFICATION
*  TINQ    TIME DEPOSIT ACCOUNT VERIFICATION
*  INQU    CUSTOMER NAME AND ADDRESS INQUIRY
*  HELP    NEW USER TUTORIAL
*  IM--    (ANY TRANSACTION BEGINNING WITH 'IM')
*
   ;
    ELSE IF
      TRANSACT = :'RINQ' OR TRANSACT = :'TINQ' OR
      TRANSACT = :'INQU' OR TRANSACT = :'HELP' OR
      TRANSACT = :'IM'
    THEN TRANTYPE = 'S';
*
* THE FOLLOWING TRANSACTIONS WILL BE CLASSIFIED AS
* MEDIUM:
*
* TRANSID  APPLICATION
*  ----    ----------------------------------------
*  PRIN    TERMINAL PRINT SPOOLER
*  EVAL    ARITHMETIC UTILITIES
*  MEDM    ANOTHER MEDIUM TRANSACTION
*  ACCT    ACCOUNT CROSS INDEX
*  APAY    ADMINISTRATIVE PAYROLL TRIAL REPORT
*  R---    (ANY TRANSACTION BEGINNING WITH 'R')
*  T---    (ANY TRANSACTION BEGINNING WITH 'T')
*
 ;
    ELSE IF
      TRANSACT = :'PRIN' OR TRANSACT = :'EVAL' OR
      TRANSACT = :'MEDM' OR TRANSACT = :'ACCT' OR
      TRANSACT = :'APAY' OR TRANSACT = :'R' OR
      TRANSACT = :'T'
    THEN TRANTYPE = 'M';
*
* ALL OTHER TRANSACTIONS WILL BE CLASSIFIED LONG.
*
  ;
    ELSE TRANTYPE = 'L';






                           +--------------------------------------------------------------------------+
                           | INSTALLATION PREPARATION WORKSHEET: IMS Relative Longevity Code          |
                           |                                     Determination                        |
                           | PARMS Library Member is IMSRLRT                                          |
                           | Reference Sections: 7.3.1                                                |
                           +--------------------------------------------------------------------------+
                           |                                                                          |
                           | * VALIDATE FOR VALID SOURCE DATA, IF APPLICABLE:                         |
                           |                                                                          |
                           | IF                                                                       |
                           | (condition c-1) _______________________________________________________  |
                           | (condition c-2) _______________________________________________________  |
                           | (condition  . ) _______________________________________________________  |
                           | (condition  . ) _______________________________________________________  |
                           | (condition c-n) _______________________________________________________  |
                           | THEN TRANTYPE = 'C';  /* CONVERSATIONAL TYPE */                          |
                           | ELSE IF                                                                  |
                           | (condition s-1) _______________________________________________________  |
                           | (condition s-2) _______________________________________________________  |
                           | (condition  . ) _______________________________________________________  |
                           | (condition  . ) _______________________________________________________  |
                           | (condition s-n) _______________________________________________________  |
                           | THEN TRANTYPE = 'S';  /* SHORT TYPE */                                   |
                           | ELSE IF                                                                  |
                           | (condition m-1) _______________________________________________________  |
                           | (condition m-2) _______________________________________________________  |
                           | (condition  . ) _______________________________________________________  |
                           | (condition  . ) _______________________________________________________  |
                           | (condition m-n) _______________________________________________________  |
                           | THEN TRANTYPE = 'M';  /* MEDIUM TYPE */                                  |
                           | ELSE TRANTYPE = 'L';  /* LONG TYPE */                                    |
                           | (response data element adjustment logic, if any, goes here)              |
                           +--------------------------------------------------------------------------+
                           | ....5...10...15...20...25...30...35...40...45...50...55...60...65...70.. |
                           +--------------------------------------------------------------------------+

Figure 7-4. IMS Longevity Code Exit Worksheet