![]() Chapter Contents |
![]() Previous |
![]() Next |
| LASTCMD |
| Category: | Command |
| Syntax | |
| Details | |
| Example | |
| See Also |
Syntax |
| cmdtext=LASTCMD(); |
Type: Character
| Details |
If the command contains multiple words, only the first word is returned.
LASTCMD is usually used in conjunction with CONTROL ENTER, ALWAYS, or ALLCMDS.
| Example |
Retrieve the last command that was issued in the window and display a message, based on that command name:
INIT:
control always;
return;
MAIN:
cmd=lastcmd();
if cmd='GO' then
_msg_='Last command was '||cmd;
return;
| See Also |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.