Chapter Contents |
Previous |
Next |
SETTERM |
Language element: | function |
Category: | terminal-access |
OpenVMS specifics: | All aspects are host-specific |
Syntax | |
Details | |
Example | |
See Also |
Syntax |
SETTERM(characteristic-name,new-value) |
Details |
The SETTERM function modifies a terminal characteristic from within the SAS System. The SETTERM function can be called from either the DATA step or an SCL program. This function eliminates the need to use an X command or statement to modify your terminal characteristics.
The return value is a numeric status code, which is the previous setting of the characteristic, before the characteristic is changed by the function call.
Characteristic values that are Boolean (on or off) are returned as 1 or 0. Characteristic values that have integer values, such as page size, are returned as the function value.
If an error occurs during the execution of the SETTERM function, the result returned is negative. Some common error return codes include the following:
-20 |
represents the OpenVMS symbolic name SS$_BADPARAM, which means that the characteristic name is not valid or was specified ambiguously. |
-2313 |
represents the OpenVMS symbolic name, SS$_NOSUCHDEV, which means the current SYS$OUTPUT device is not a terminal device, or does not exist. |
The characteristics that can be set with the SETTERM function are the same as those that can be returned by the GETTERM function, and they are listed in Terminal Characteristics.
Characteristic | Explanation | |
---|---|---|
ALTTYPEAHEAD | Alternate typeahead buffer enabled | |
ANSICRT | Device is an ANSI CRT | |
APPLICATION | Keypad is in application mode | |
AUTOBAUD | Automatic baud rate detection is enabled | |
AVO | Terminal has advanced video option | |
BLOCK | Terminal is in block transfer mode | |
BROADCAST | Terminal accepts broadcast messages | |
BROADCASTMBX | Broadcast messages sent via mailbox | |
DECCRT | Terminal is a DEC CRT (VT100 or later) | |
DECCRT2 | Terminal is a DEC CRT (VT200 or later) | |
DIALUP | Terminal is on a dialup line | |
DISCONNECT | Terminal disconnects when hangup occurs | |
DMA | Terminal uses asynchronous DMA | |
DRCS | Terminal has soft character font set | |
ECHO | Terminal input is echoed | |
EDIT | Terminal has editing capabilities | |
EDITING | Terminal line editing is enabled | |
EIGHTBIT | Terminal accepts 8-bit escape codes | |
ESCAPE | Terminal validates escape sequences | |
FALLBACK | Output is transformed by TFF | |
FORMFEED | Terminal has mechanical form feed | |
HALFDUPLEX | Terminal is in half-duplex mode | |
HANGUP | Modem is hung up when terminal logs out | |
HOSTSYNC | Host system is synchronized to terminal | |
INSERT | Default mode is insert instead of overstrike | |
LINESIZE | Sets terminal line size | |
LOCALECHO | Command line read operations are echoed | |
LOWER | Terminal accepts lowercase characters | |
MAILBOX | Terminal does not use associated mailbox | |
MODEM | Terminal is connected via a modem | |
MODHANGUP | Modify hangup behavior | |
PAGESIZE | Sets terminal page size | |
PASSTHROUGH | Pass all characters unmodified/examined | |
PRINTER | Device has a printer port | |
READSYNC | Read synchronization is enabled | |
REGIS | Device supports graphics | |
REMOTE | Terminal is on a dialup line | |
SCOPE | Terminal is a video display device | |
SECURE | Device is on secure communication line | |
SIXEL | Device supports graphics | |
SYSPASSWORD | System password required at login | |
TAB | Terminal has mechanical tab | |
TTSYNC | Terminal is synchronized to host system | |
TYPEAHEAD | Terminal accepts unsolicited input | |
WRAPCR/LF | Inserted for line wrap | |
XON | XON/XOFF handshaking used |
Example |
In the following example, the purpose of the DATA step is to turn off broadcast messages, and to force the terminal line width to be 80 characters. The old settings for these values are stored in macro variables so that they can be reset easily at a later time:
data _null_; old_bc=setterm("broadcast",0); old_ls=setterm("linesize",80); call symput("saved_bc",put(old_bc,best.)); call symput("saved_ls",put(old_ls,best.)); run;
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.