Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

Subject: Node Name

Original Message
Name: amsedelm
Date: January 21, 2008 at 12:04:15 Pacific
Subject: Node Name
OS: OpenVMS V7.3-2
CPU/Ram: 4/16GB
Model/Manufacturer: HP/ES 45
Comment:
How would you extract just the NODE name from the command sh sys ? I'm kind of stumped.
Thanks

Report Offensive Message For Removal

Response Number 1
Name: HakZan
Date: January 21, 2008 at 23:34:42 Pacific
Subject: Node Name
Reply: (edit)
I'm not sure what you are trying to do.....

But if you only want to get the nodename for the node you are logged into.

$ node = f$getsyi("nodename")

or

$ write sys$output f$getsyi("nodename")


To give a direct answer to your question.

$ pipe show system/noproc | -
( inquire str ; -
nodename = f$element(4," ",str) ; -
define/job node &nodename )
$ node = f$trnlnm("node")

regards,

Hakan Zanderau
HA-solutions

Please supply more information when asking for help.....


Report Offensive Follow Up For Removal

Response Number 2
Name: amsedelm
Date: January 22, 2008 at 05:46:47 Pacific
Subject: Node Name
Reply: (edit)
Thanks, Haka! That's just what I needed.
Mike Ledesma
Petro Heating Oil

Report Offensive Follow Up For Removal

Response Number 3
Name: Bob Gezelter
Date: February 2, 2008 at 06:13:50 Pacific
Subject: Node Name
Reply: (edit)
Mike,

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


Report Offensive Follow Up For Removal



Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Node Name

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software



Version Tracker Pro
Keep your software current and secure, effortlessly

Click Here for a Free Scan

Driver Agent
Automatically find the latest drivers for your computer.
Click Here for a Free Scan



The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC