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: Program name

Original Message
Name: amsedelm
Date: January 31, 2008 at 12:29:26 Pacific
Subject: Program name
OS: OpenVMS V7.3-2
CPU/Ram: 4/16GB
Model/Manufacturer: HP/ES 45
Comment:
How do you return the current program name of a vms program? For instance., in unix it's $0. I'm writing a script that will be installed on different nodes with slightly different script names. But, I want this script to have the same code for all nodes.
Thanks.

Report Offensive Message For Removal

Response Number 1
Name: HakZan
Date: February 1, 2008 at 02:44:55 Pacific
Subject: Program name
Reply: (edit)
I'm not a frequent UNIX-user so I have to make some guesses......

in Unix $ is used to translate variables.
$0 is the first variable and vill return the running image/file.

There are eight reserved parameters in VMS ( P1 - P8 ), but they are used to pass parameters into a commandfile.


example,

TEST.COM
$ SHOW SYMBOL P%


$ @TEST
P1 = ""
P2 = ""
P3 = ""
P4 = ""
P5 = ""
P6 = ""
P7 = ""
P8 = ""

$ @TEST hello 5 vms 123
P1 = "HELLO"
P2 = "5"
P3 = "VMS"
P4 = "123"
P5 = ""
P6 = ""
P7 = ""
P8 = ""

To get the name of the executing commandfile, you have to use a lexical function called F$ENVIRONMENT

$ file = f$environment("procedure")
$ show symbol file

regards,

Hakan Zanderau
HA-solutions


Report Offensive Follow Up For Removal

Response Number 2
Name: HakZan
Date: February 1, 2008 at 02:49:30 Pacific
Subject: Program name
Reply: (edit)
Using the lexical f$environment outside a commandfile ( $-prompt ) will return the name of your terminal.

Hakan Zanderau
HA-solutions

$ HELP LEXICALS for more help


Report Offensive Follow Up For Removal

Response Number 3
Name: amsedelm
Date: February 1, 2008 at 12:01:55 Pacific
Subject: Program name
Reply: (edit)
Thanks, Hakan! I'm a Unix/Linux/IBM Mainframe guy on a crash course in VMS. Much apperciated!
Mike
Petro Heating Oil
IT Dept.

Report Offensive Follow Up For Removal

Response Number 4
Name: Bob Gezelter
Date: February 1, 2008 at 16:59:48 Pacific
Subject: Program name
Reply: (edit)
Mike,

You may want to take a look at some of my presentations on using lexical functions. One such presentation, "DCL Lexicals: OpenVMS Jujitsu", can be found at http://www.rlgsc.com/decus/usf95/in... .

There is also a series of columns that appeared on OpenVMS.org on logical names, an often related area when parameterizing scripts. Links to these columns appear on http://www.rlgsc.com/publications.html

- Bob Gezelter, http://www.rlgsc.com


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: Program 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