FOCUS AREAS

ARM - Application Response Measurement

%ARMGTID


Defines a transaction class

Type: ARM macro

Syntax

%ARMGTID(TXNNAME=aname,<options>)

Required Argument

TXNNAME=aname
is a required transaction name that is a SAS character variable or quoted literal value.
Restriction: The transaction name has a 127 character limit.

Options

APPID=
is an application ID. It must be a SAS numeric variable or constant.
Note:   Replaced by APPIDVAR parameter for Release 9.0 and later.   
 
APPIDVAR=
is a SAS numeric variable that supplies the value of the application ID.
 
LEVEL=
is a variable that specifies the conditional execution level. The value must be a numeric constant or variable.
 
MACONLY=NO | YES
allows the %ARMGTID macro to be issued in open code, outside of a DATA step.
Note:   MACONLY= is experimental for Release 8.2.  
Default: NO
 
METRNAM1 - METRNAM7=
is the user name for the user-defined metric and must be a SAS character variable or quoted literal value.
Note:   METRNAM1 - METRNAM7 is valid for Release 9.0 and later.   
Requirement: The user name and user-defined metric definition must be specified together
 
METRDEF1-METRDEF7=
is the definition of the user-defined metric. The value must be one of the following:
Note:   METRDEF1-METRDEF7 is valid for Release 9.0 and later.  
Requirement: The user name and user-defined metric definition must be specified together
 
Metric
Type
Metric description
COUNT32
COUNT64
COUNTDIV
use the counter to sum up the values over an interval.
A counter can also calculate average values, maximums,
and minimums per transaction, and other statistical calculations.
GAUGE32
GAUGE64
GAUGEDIV
use the gauge when a sum of values is not needed.
A gauge can calculate average values, maximums, and minimums per
transaction, and other statistical calculations.
ID32
ID64
use the numeric ID simply as an identifier but not as a measurement
value, such as an error code or an employee ID.
No calculations can be performed on the numeric ID.
SHORTSTR
LONGSTR
use the string ID as an identifier value,
such as an error code or an employee ID.
No calculations can be performed on the string ID.
Restriction:METRDEF7 can only equal LONGSTR.
METRDEF1-6 cannot equal LONGSTR.
 
SCL=NO | YES
allows the %ARMGTID macro to be issued in SCL environment.
Note:   SCL is valid for Release 9.0 and later.  
Default: NO
 
TXNDET=
is a transaction detail that is a SAS character variable or quoted literal value.
Restriction: The transaction detail has a 127 character limit.
 
TXNIDVAR=
is a SAS numeric variable that contains the value of the transaction ID.

Description

%ARMGTID is used to name a transaction class. Transaction classes are related units of work within an application. One or more %ARMGTID calls are typically issued when the application starts in order to define each of the transaction classes that is used by the application.


Input

The input is an application ID generated from a previous %ARMINIT macro. If the APPIDVAR= option is supplied, the supplied value is used as the application ID. Otherwise, the value of the global macro variable _ARMAPID ID is used.


Output

The _ARMTXID variable, which is the transaction class ID, is the output. Any variable that the TXNIDVAR= parameter points to is also updated.

Examples

Example 1: Basic

data _null_;
  %armgtid(txnname='txn OE', txndet='Order Entry txn class');
run;

Example 2: Saving the transaction ID

data _null_;
  %arminit(appname=aname, appuser='sasxyz');
  %armgtid(txnname='txn OE', txndet='Order Entry txn class',
            txnidvar=txn1);
  put "transaction id is " txn1;
run;

Example 3: User Metrics

%let _armacro = 1;
%arminit(appname='Open Code getID test w/ user metrics');
%armgtid(txnname='User MetricsTest',metrNam1=ShortStr,metrDef1=short); /* valid metric */
%armgtid(txnname='User Metrics 02',metrNam1=ShtStr,metrDef1=short,metrNam3=cnt32,metrDef3=count32,
                                    metrNam7=LstStr,metrDef7=long); /* valid metric */
%armend();
run;