SAS Component Language Dictionary |
Category: | System Variable |
Details | |
Example | |
See Also |
Details |
_STATUS_ is a system variable that is created for every SCL program that is compiled. The compiler creates a space for _STATUS_ in the SCL data vector. _STATUS_ is maintained as a single-character string variable.
When an SCL program executes, _STATUS_ can have one of the following values:
In addition to the execution values, you can assign the following values to _STATUS_:
Assigning a value to _STATUS_ does not imply an immediate return. The value of _STATUS_ is queried only after the SCL program returns control to the application. To return control to the application after assigning a value to _STATUS_, use the STOP or RETURN statement.
FRAME entries can also use the _getStatus and _setStatus methods to query and update the _STATUS_ variable.
Example |
The following program calls OKTOEND.FRAME to display a confirmation window that allows the user to select OK or CANCEL in response to the END command. OKTOEND returns a 1 if it is OK to end or a 0 if it is not.
TERM: /* Check whether the END command was issued */ if _status_ eq 'E' then do; call display( 'oktoend.frame', ok ); /* Check whether the user wants to cancel the */ /* END command */ if ok eq 0 then do; _status_ = 'R'; return; end; end; ...The rest of the TERM section... return;
See Also |
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.