Actually, a far safer way of getting the nodename from a script is to use the F$GETSYI lexical function. For example:
$ WRITE SYS$OUTPUT F$GETSYI("NODENAME")
Almost all of the information that is displayed by the various show commands is available from one DCL lexical function or another. Of particular interest are the F$GETxxxI series (F$GETSYI, F$GETDVI, and F$GETJPI), and various others include F$ENVIRONMENT.
Using the lexicals is a FAR superior approach to getting information than parsing the output of the SHOW commands.
In fact, one can write implementations of most of the SHOW commands using the lexical functions to get information. See "DCL Lexicals: OpenVMS Jujitsu", slides available at http://www.rlgsc.com/decus/usf95/in... , for some comments.
- Bob Gezelter, CSA, CSE, http://www.rlgsc.com
Flushing, New York