%ARMINIT Macro

Initializes an application.

Category: ARM Macro

Syntax

Required Argument

APPNAME='application-name'

is the application name. The value is a SAS character variable or quoted literal.

Restriction The application name has a 127-character limit.

Optional Arguments

APPIDVAR=numeric variable

is the application ID. The value must be a numeric variable.

APPUSER='application-userID'

is the application user ID. The value is a SAS character variable or quoted literal.

Restriction The application user ID has a 127-character limit.

GETID=NO | YES

is optional and denotes whether to generate an ARM_GETID function call after ARM_INIT. If the value is YES, you can define the user metrics.

Default NO
Requirement TXNNAME= is required when you use GETID=YES.

LEVEL=numeric constant or variable

is a variable that specifies the execution level. The value must be a numeric constant or variable.

MACONLY=NO | YES

enables the %ARMINIT macro to be issued in open code. 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

SCL=NO | YES

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

TXNIDVAR=numeric variable

is a numeric variable that contains the value of the transaction ID.

Restriction Use TXNIDVAR= only when you use GETID=YES.

TXNDET='name'

is a transaction detail. The value is a SAS character variable or quoted literal.

Restriction The transaction detail has a 127-character limit. Use TXNDET= only when you use GETID=YES.

TXNNAME='transaction-name'

is the transaction name. The value is a SAS character variable or quoted literal value.

Requirement TXNNAME= is required only when you use GETID=YES.

Details

A %ARMINIT macro call names the application and the users of the application. In addition, it initializes the ARM interface if a previous %ARMINIT macro has not been issued. Typically, it is executed when the application initializes.
Note: You must globally enable ARM macros by setting the _ARMEXEC macro variable to a value of 1. For more information, see Setting the _ARMEXEC Macro Variable.
There is no input.
The output is the _ARMAPID variable, which is the application ID that was returned from the ARM_INIT function call. If GETID=YES, then _ARMTXID is returned also. Any variables for APPIDVAR= and TXNIDVAR= are updated.

Examples

Example 1: Basic Usage

%let _armexec=1;
%let _armacro=1;
data _null_;
  %arminit(appname='General Ledger');
run

Example 2: Supplying the User ID

%let _armexec=1;
%let _armacro=1;
data _null_;
  name='Order Entry Application';
  %arminit(appname=application-name, appuser='sasxyz');
run;

Example 3: Generating an ARM_GETID in Addition to an ARM_INIT

%let _armexec=1;
%let _armacro=1;
data _null_;
  %arminit(appname='Warehouse App', getid=YES,
           txnname='Query 1', txndet='My long query');
run;

Example 4: Saving the Application ID

%let _armexec=1;
%let _armacro=1;
data _null_;
  %arminit(appname=application-name, appuser='sasxyz', appidvar=appl);
  put “application id is “ appl;
run;