Previous Page | Next Page

SAS Component Language Dictionary

LASTCMD



Returns the text of the last command that was issued from the application window
Category: Command

Syntax
Details
Example
See Also

Syntax

cmdtext=LASTCMD();

cmdtext

contains the text of the last command that was issued from the application window.

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

WORD

Previous Page | Next Page | Top of Page