Chapter Contents |
Previous |
Next |
EXECCMDI |
Category: | Command |
Syntax | |
Details | |
Examples | |
Example 1: Using EXECCMDI to Ensure Correct Window Size | |
Example 2: Using EXECCMDI to Confirm a Delete Request | |
See Also |
Syntax |
CALL EXECCMDI(command<,when>); |
Type: Character
'EXEC'
'NOEXEC'
Type: Character
Details |
By default, the EXECCMDI routine immediately executes the specified global command or list of global commands. After executing the command, the program statement that immediately follows the call to EXECCMDI is executed. EXECCMDI is valid only in SCL applications that display a window.
If you specify EXEC
,
which is the default for the when argument, then
you should issue only windowing environment global commands and full-screen
global commands through this routine. Any procedure-specific commands that
are executed with EXECCMDI are ignored.
An error is displayed on the message line if the string that is passed to EXECCMDI is not a valid command, but the SCL program is not halted. Any statements that follow the call to the routine are still executed. If multiple commands are specified and one is invalid, none of the remaining commands are executed.
With the NOEXEC option, EXECCMDI allows only one procedure-specific or custom command to be executed. EXECCMDI saves the command in the command buffer and does not execute the command immediately. The program statement that immediately follows the CALL EXECCMDI routine is executed. The command in the command buffer is executed when control returns to the application.
If multiple EXECCMDI routines each have the NOEXEC option specified, then only the command that was issued by the last EXECCMDI routine is executed. The previous commands are cleared.
The NOEXEC option does not alter the way global commands are handled. Global commands are still executed immediately.
With CONTROL ALWAYS in FSEDIT applications or CONTROL ALLCMDS in SAS/AF applications, issuing EXECCMDI with the NOEXEC option from MAIN tells SAS not to execute statements in MAIN again before executing the specified procedure-specific or custom command. This is different from issuing an EXECCMD routine from MAIN, which would execute statements in MAIN again before executing the specified command.
Note: We do not recommend combining EXECCMD and EXECCMDI
routines, because the order of execution may be unexpected.
Examples |
Ensure that the window is the correct size when the application runs:
INIT: call execcmdi('zoom off'); return;
From an FSEDIT SCREEN entry, open CONFIRM.FRAME to confirm the delete request before the row is actually deleted:
FSEINIT: control always; length confirm $ 3; return; INIT: return; MAIN: if word(1, 'U') =: 'DEL' then do; call display('confirm.frame', confirm); if confirm = 'YES' then call execcmdi('delete', 'noexec'); end; return; TERM: return;CONFIRM.FRAME contains two pushbutton controls, YES and NO, and is controlled by the following program:
entry confirm $ 3; YES: confirm = 'YES'; _status_='H'; return; NO: confirm = 'NO'; _status_='H'; return;
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.