Previous Page | Next Page

Functions and CALL Routines under OpenVMS

SETTERM Function: OpenVMS

Modifies a characteristic of your terminal device.
Category: Terminal-Access
OpenVMS specifics: All aspects are host-specific

See Also




is the name of the terminal characteristic to be modified. The argument can be a character variable, a character literal enclosed in double quotation marks, or another character expression.


is the new setting for the characteristic.


The SETTERM function modifies a terminal characteristic from within SAS. 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:


represents the OpenVMS symbolic name SS$_BADPARAM, which means that the characteristic name is not valid or was specified ambiguously.


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.

Terminal Characteristics
Characteristic Explanation
ALTTYPEAHEAD Alternate type ahead buffer enabled
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 monitor 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


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_;
   call symput("saved_bc",put(old_bc,best.));
   call symput("saved_ls",put(old_ls,best.));

See Also

Previous Page | Next Page | Top of Page