%ARMSTOP Macro

Specifies the end of a transaction instance.

Category: ARM Macro

Syntax

Optional Arguments

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 %ARMSTOP 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

METRVAL1–7='name'

is the value of the user-defined metric. The value must be a SAS character variable or a quoted literal value up to eight characters in length.

Requirement The value of the user-defined metric must correspond to the user metric defined in %ARMGTID.

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

SHANDLE=numeric variable or constant

is the start handle to use on the ARM_UPDATE function call. The value must be a numeric variable or constant.

SHDLVAR=numeric variable

is a numeric variable that contains the value of the start handle.

STATUS=numeric variable or numeric constant

is a transaction status value to pass to the ARM_STOP function call. The value must be a numeric variable or numeric constant 0, 1, or 2. The default is 0.

Default NO

Details

The %ARMSTOP macro signals the end of a transaction that was started using an %ARMSTRT macro.
The input is a start handle that is generated by a previous %ARMSTRT macro. If the SHANDLE= or SHDLVAR= option is specified, the value is used as the start handle. Otherwise, the value of the global macro variable _ARMSHDL is used.
The output is the _ARMRC variable, which contains the error status code that was returned from the ARM_STOP function call.

Examples

Example 1: Basic Usage

data _null_;
  %armstop;   /* status  defaults to zero*/
run;

Example 2: Supplying a Nonzero Status

data _null_;
  rc=2;
  %armstop(status=rc);
run;

Example 3: Supplying a Start Handle Using SHDLVAR=

%let _armexec=1;
%let _armacro=1;
data _null_;
  %arminit(appname=application-name, appuser='sasxyz');
  %armgtid(txnname='txn OE', txndet='Order Entry txn class');
  %armstrt(shdlvar=sh1);
run;
data _null_;
  %armstop(shdlvar=sh1);
run;