| > $ term = f$getdvi("sys$output","trm")
> $ if term .nes. TRUE then $set term sys$output:/inq
F$getdvi("sys$output","trm") for the FileView process does return FALSE.
since sys$output is NLA0: for the FileView process.
So, the idea is good, but there seem to be a few problems in the deed:
Why ask if it is a terminal, get back the answer FALSE, and *then* do
a set term/inq on something which you know is not a terminal? Did
your logic get reversed?
Why are you doing "$set term sys$output:/inq" instead of simply
"$set term/inq"? Not that this matters.
And where is this value "TRUE" getting defined? When I tried your
example, I got %DCL-W-UNDSYM for TRUE.
Try this instead:
$ term = f$getdvi("sys$output","trm")
$ if .not. term then $goto not_a_terminal
$ set term/inquire
$ ... other terminal-specific stuff
$not_a_terminal:
$ ...
You could also check that sys$input is type file. For FileView,
sys$input will be sys$manager:decw$startvue.com, though this may
change in a future release.
-steve- (with Karen Brouillette's cogent analysis)
|