Chapter Contents


SAS Companion for the CMS Environment

Macro Statements

is analogous to the windowing environment KEYDEF command. It enables you to define function keys. The form of this statement is

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

The number of keys available depends on your terminal. Most terminals that are used under CMS have either 12 or 24 program function (PF) keys. To define a key, specify the key-name (F1 through F24) of the key and the new definition.

If you omit the definition, SAS prints a message in the log that shows the current definition of the key; otherwise, the key's definition is changed to whatever you specified.

executes CMS commands. It is similar to the CMS statement, which is described in CMS. The %CMS statement enables you to execute CMS commands immediately. It places the return code in the automatic variable &SYSRC. You can use the %CMS statement either inside or outside a macro. The form of the statement is

%CMS <command>;

You can use any CMS command or any sequence of macro operations that generate a CMS command. If you omit the command, your SAS session is suspended and your CMS session is placed in CMS subset mode. To return to the SAS session, type return and press Enter.

If a SAS program that contains a %CMS statement is transported to another operating environment, the %CMS statement is treated as a comment.

executes CMS commands. The form of the statement is

%SYSEXEC <command>;

Under CMS, the %SYSEXEC statement works exactly like the %CMS statement. The two statements are different only if you transport your SAS program to a different operating environment. Because %SYSEXEC statements are recognized on multiple operating environments, each operating environment expects commands that are appropriate for that operating environment.

Chapter Contents



Top of Page

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