FOCUS AREAS

%ARMEND

Signifies the termination of an application

Type: ARM macro

Syntax

%ARMEND<(options)>;

Options 

APPID=
is the application ID. The value 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.
Restriction: Use the APPVAR= only when you use GETID=YES. See %ARMINIT for information on GETID=YES.
 
LEVEL=
is a variable that specifies the conditional execution level. The value must be a numeric constant or variable.
 
MACONLY=NO | YES
allows the %ARMEND macro to be issued in open code, outside of a DATA step.
Note:   MACONLY= is experimental for Release 8.2.  
Default: NO
 
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

Description

Use %ARMEND when you are finish initiating new activity using the ARM API. %ARMEND is typically called when an application/user instance is terminating. Each %ARMEND is paired with one %ARMINIT to mark the end of an application. %ARMEND is a signal from the application that it will not issue anymore ARM calls, and it is typically executed at application termination. Issuing ARM calls after an application has ended with %ARMEND results in an error.


Input

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


Output

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

Examples

Example 1: Basic usage requires no options

data _null_;
   %armend;
run;

Example 2: Supply an application ID using APPIDVAR=

data _null_;
   %arminit(appname=aname, appuser='sasxyz, appidvar=myapp);
run;

data _null_;
   %armend(appidvar=myapp);
run;