Previous Page | Next Page

ARM Macros

%ARMEND Macro



Indicates the termination of an application.
Category: ARM Macro

Syntax
Options
Details
Input
Output
Examples
Example 1: Basic Usage
Example 2: Supplying an Application ID Using APPIDVAR=

Syntax

%ARMEND< (option-1 <, ...option-n>)>;

Options

APPID=numeric variable or constant

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.  [cautionend]

APPIDVAR=numeric variable

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

LEVEL=numeric variable or constant

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

MACONLY=NO | YES

enables the %ARMEND 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

Details

Use the %ARMEND macro when you are finished initiating new activity with the ARM interface. The %ARMEND macro is typically called when an application or user instance is terminating. Each %ARMEND macro is paired with an %ARMINIT. The %ARMEND macro means that the application does not issue any more ARM calls. ARM calls issued after an application has been terminated with the %ARMEND macro result in an error. All transaction class identifiers are cleared and are no longer available after the %ARMEND macro.

Note:   You must terminate ARM with an %ARMEND macro to avoid getting a warning or an error from the %ARMPROC macro.  [cautionend]


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 is used.


Output

The output is the _ARMRC variable, which is the error status code that was returned from the ARM_END function call.


Examples


Example 1: Basic Usage

data _null_;  
   %armend;
run;


Example 2: Supplying an Application ID Using APPIDVAR=

%let _armexec=1;
%let _armacro=1;

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

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

Previous Page | Next Page | Top of Page