Chapter Contents |
Previous |
Next |
SAS Companion for the OS/2 Environment |
The following macro statements have behavior specific to OS/2:
%KEYDEF key-name | 'key-name' <'definition'>; |
If the definition argument is omitted, a message is printed to the log showing the current definition of the key; otherwise, the key's definition is changed to whatever you specify.
Key names might vary depending on your workstation. You can define any key listed in the KEYS window, provided it is not reserved by OS/2. You must enclose in quotes any key name that contains a special character or contains a space, such as SHF F2 or CTRL+Z.
You can also use the %KEYDEF statement to define commands that are executed when the mouse buttons are pressed. The following key sequences are accepted as the key-name argument:
Key Name | Key Sequence |
---|---|
RMB | right mouse button |
SHF RMB | SHIFT+right mouse button |
CTL RMB | CTRL+right mouse button |
MMB | middle mouse button |
SHF MMB | SHIFT+middle mouse button |
CTL RMB | CTRL+right mouse button |
For example, to assign the ZOOM command to the CTL RMB key sequence, submit the following command:
%keydef 'ctl rmb' 'zoom';
%SYSEXEC <command>; |
The command argument can be any operating system command or any sequence of macro operations that generate an operating system command. You can also use the command argument to invoke a OS/2 application such as Notepad.
Omitting the command argument launches a Command Prompt subprocess, which is interactive. To return to your SAS session, type EXIT at the command prompt and press ENTER. If you omit the command argument in the %SYSEXEC statement, the SYSRC automatic variable is set to 0.
The following is a simple example of %SYSEXEC:
%sysexec time;This statement launches a command prompt session that displays the following lines:
The current time is: 16:32:45.16 Enter new time:
Note: The %SYSEXEC statement uses the XSYNC and XWAIT
system option values just like the X statement and X command do. For more
information about these system options, see XSYNC System Option and
XWAIT System Option.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.