Chapter Contents

Previous

Next
STDMSG

STDMSG



Displays the text of the SAS software message that is generated by an unknown command

Category: Message


Syntax
Example
See Also

Syntax

cval=STDMSG();

cval
contains the message text. A blank means that no window exists in which to display the message.

Type: Character


Example

Use WORD to read a command from the command line in a PROGRAM entry and check the command for validity. If the command is not valid, the standard message is displayed. Valid commands in this case are PRINTIT and FILEIT. Any other commands produce the standard error message for invalid commands.

INIT:
   control always;
return;
MAIN:
   if _status_ in ('C' 'E') then return;
   command=word(1);
   call nextcmd();
   select(upcase(command));
      when('PRINTIT') _msg_='PRINTIT is specified';
      when('FILEIT') _msg_='FILEIT is specified';
      otherwise do;
         call execcmdi(command);
         stdmsg=stdmsg();
         if stdmsg ne _blank_ then _msg_=stdmsg;
         return;
         end;
   end;
return;
TERM:
return;

See Also

NEXTCMD

NEXTWORD

SYSMSG

WORD


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.