Modifies a characteristic of your terminal device
| Language element: |
function
|
| Category: |
terminal-access
|
| OpenVMS specifics: |
All aspects are
host-specific
|
|
SETTERM(characteristic-name,new-value)
|
-
characteristic-name
-
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.
-
new-value
-
is the new setting for the characteristic.
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:
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.
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;
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.