Chapter Contents |
Previous |
Next |
_STATUS_ |
Category: | System Variable |
Details | |
Example | |
See Also |
Details |
When an SCL program executes, _STATUS_ can have one of the following values:
' ' (blank) |
A control or field was modified or selected. |
E | An END or equivalent command was issued. |
C | A CANCEL or equivalent command was issued. |
P | A pop-up menu event occurred. |
G | The getrow section was called for the top row of an extended table. |
K | A command other than an END or CANCEL, or their equivalents, was issued. Valid only for FRAME entries. |
D | A control was selected with a double click. Valid only for FRAME entries. |
In addition to the execution values, you can assign the following values to _STATUS_:
'H' |
Terminate the current window without further input from the user. Control returns to the program or window that invoked the application. Note that the TERM section of the program is not executed in this case. In FSEDIT, if a user modified a table variable value in the current row, the modified values are not written to the SAS table. |
'R' |
Resume execution of the SCL program without exiting the application in SAS/AF or the current row in FSEDIT. When you set the value of the _STATUS_ variable to 'R', the procedure ignores the END or CANCEL command that the user just issued. This value is useful only when set in the TERM section of your program or in the _preterm method of a FRAME entry control, because the specified action (not allowing an exit from the program or the current row) occurs after the user has issued an END or CANCEL command in SAS/AF or after a user has attempted to leave a row in FSEDIT. |
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 |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.