Chapter Contents

Previous

Next
SAS Companion for the OpenVMS Operating Environment

Macro Statements

The following macro statements have operating dependencies that are specific to the OpenVMS environment:

%KEYDEF
is analogous to the KEYDEF command in the SAS windowing environment. It enables you to define function keys. The syntax of this statement is

KEYDEF key-name | 'key-name' <'definition'>;

If you omit the definition, SAS prints a message in the log showing the current definition of the key; otherwise, the key definition is changed to whatever you specified. The value of key-name varies from terminal to terminal. You can define any key that is listed in the KEYS window. Any keyname that is hyphenated or contains a space, such as "CTRL-G" and "Gold 9", must be enclosed in double quotation marks.

%SYSEXEC
issues DCL commands immediately and places the operating environment return code in the automatic variable SYSRC. The syntax of the %SYSEXEC statement is

%SYSEXEC <DCL-command>;
where DCL-command can be any OpenVMS operating environment command or any sequence of macro operations that generates an operating environment command.

The %SYSEXEC statement is similar to the X statement, which is described in Issuing DCL Commands during a SAS Session. You can use the %SYSEXEC statement either inside a macro or in open code.

Omitting DCL-command puts you in an interactive OpenVMS subprocess and sets the value of the SYSRC automatic variable to 0. To return to your SAS session, type LOGOFF at the subprocess prompt.

The following is an example of %SYSEXEC:

%sysexec show time;
The output looks something like this:
12-JAN-1998 16:02:52


Chapter Contents

Previous

Next

Top of Page

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