FOCUS AREAS

ARM - Application Response Measurement

%ARMSTOP


Stops a previous transaction

Type: ARM macro

Syntax

%ARMSTOP<(options)>

Options

LEVEL=
is a variable that specifies the conditional execution level. The value must be a numeric constant or variable.
 
MACONLY=NO | YES
allows the %ARMSTOP macro to be issued in open code, outside of a DATA step.
Note:   MACONLY is experimental for Release 8.2.  
Default: NO
 
METRVAL1-METRVAL7=
is the value of the corresponding user-defined metric. The value must correspond to user metrics defined on %ARMGTID
Note:   METRVAL1-METRVAL7 is valid for Release 9.0 and later.  
Requirement:The value of the user-defined metric must correspond to the user metrics defined in %ARMGTID.
 
SCL=NO | YES
allows the %ARMUPDT macro to be issued in SCL environment.
Note:   SCL is valid for Release 9.0 and later.  
Default: NO
 
SHANDLE=
is a start handle. The value must be a SAS numeric variable or constant.
Note:   Replaced by SHDLVAR parameter for Release 9.0 and later.   
 
SHDLVAR=
is a SAS numeric variable that contains the value of the start handle.
 
STATUS=
is a transaction status value. The value must be a SAS numeric variable or numeric constants 0, 1, or 2. The default is 0.

Description

%ARMSTOP signals the end of a transaction that was started using an %ARMSTRT macro call.


Input

The input is a start handle that is generated from a previous %ARMSTRT call. If the SHDLVAR= option is supplied, the specified value is used as the start handle. Otherwise, the value of the global macro variable _ARMSHDL is used.


Output

The _ARMRC variable, which contains the error status code, is the output.

Examples

Example 1: Basic usage requires no parameters, transaction status defaults to zero

data _null_;
   %armstop;   /* status will default to zero*/
run;

 

Example 2: Supply a non-zero status

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

 

Example 3: Supply a start handle using SHDLVAR=

data _null_;
   %arminit(appname=aname, appuser='sasxyz');
   %armgtid(txnname='txn OE', txndet='Order Entry txn class');
   %armstrt(shdlvar=sh1);
run;

data _null_;
   %armstop(shdlvar=sh1);
run;