ARM Macros |
Category: | ARM Macro |
Syntax | |
Required Argument | |
Options | |
Details | |
Input | |
Output | |
Examples | |
Example 1: Basic Usage | |
Example 2: Saving the Transaction ID |
Syntax |
%ARMGTID (TXNNAME='transaction-name' < option-1 <, ...option-n>>); |
is a transaction name. The value is a SAS character variable or quoted literal value.
Restriction: | The transaction name has a 127-character limit. |
is the application ID to use on the ARM_GETID function call. The value must be a numeric variable or constant.
Note: Use APPIDVAR= instead of APPID= in new applications. APPID= is obsolete.
is the application ID. The value must be a numeric variable.
is a variable that specifies the execution level. The value must be a numeric constant or variable.
enables the %ARMINIT macro to be issued in open code, outside of a DATA step. You set the value to YES if the macro can be issued in open code, and NO if it can be issued only in a DATA step.
Default: | NO |
is the name of the user-defined metric. The value must be a SAS character variable or quoted literal value.
Requirement: | The name and user-defined metric definition must be specified. |
is the definition of the user-defined metric. The value must be one of the following:
use the counter to sum the values of an interval. A counter can calculate average values, maximums, and minimums per transaction, and other statistics.
use the gauge when a sum of values is not needed. A gauge can calculate average values, maximums, and minimums per transaction, and other statistics.
use the numeric ID as an identifier, but not as a measurement value. A numeric might be an error code or an employee ID. No calculations can be performed on the numeric ID.
use the string ID as an identifier. No calculations can be performed on the string ID.
Restriction: | METRDEF7= can equal only LONGSTR and can be a long string of 32 bytes. METRDEF1-6= cannot equal LONGSTR. |
Requirement: | The user name and user-defined metric definition must be specified. |
is used only in SCL programs and specifies whether the macro is in an SCL environment. Set the value to YES if the macro is in an SCL environment, and NO if it is not.
Default: | NO |
is a transaction detail. The value is a SAS character variable or quoted literal.
Restriction: | The transaction detail has a 127-character limit. |
is a numeric variable that contains the value of the transaction ID.
Details |
Use the %ARMGTID macro to name a transaction class. Transaction classes are related units of work within an application. One or more %ARMGTID macros are typically issued when the application starts to name each of the transaction classes used by the application. The %ARMGTID macro produces only one record for each transaction class, even if there are multiple %ARMGTID macros for the same transaction class.
Input |
The input is an application ID that is generated by a previous %ARMINIT macro. If the APPID= or APPIDVAR= option is provided, the specified value is used as the application ID. Otherwise, the value of the global macro variable _ARMAPID used.
Output |
The output is the _ARMTXID variable, which is the transaction class ID that was returned from the ARM_GETID function call. Any variable for the TXNIDVAR= option is updated.
Examples |
data _null_; %armgtid(txnname='txn OE', txndet='Order Entry txn class'); run;
%let _armexec=1; %let _armacro=1; data _null_; %arminit(appname=application-name, appuser='sasxyz'); %armgtid(txnname='txn OE', txndet='Order Entry txn class', txnidvar=txn1); put "transaction id is " txn1; run;
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.