Operating System - OpenVMS
1753518 Members
5157 Online
108795 Solutions
New Discussion юеВ

Re: Java on VMS - Retrieving logical names and equivalence names programmatically

 
Llewellyn Robinson
New Member

Java on VMS - Retrieving logical names and equivalence names programmatically

In Java on OpenVMS, how do you retrieve VMS logical names and equivalence names?

System.getenv() returns only a few seemingly java related items.
System.getProperties() similarly only returns java related items.

6 REPLIES 6
Steven Schweda
Honored Contributor

Re: Java on VMS - Retrieving logical names and equivalence names programmatically

Really? My Java experience in minimal, but
the C RTL function getenv() certainly can do
more than that, and I'd expect the Java stuff
to use it. ("HELP CRTL GETENV".) Do you
have a convenient demonstration program?
Bojan Nemec
Honored Contributor

Re: Java on VMS - Retrieving logical names and equivalence names programmatically

Llewellyn,

Welcome to the OpenVMS forum.


See the release notes description of System.getenv():

http://h18012.www1.hp.com/java/documentation/1.5.0/ovms/docs/release_notes.html#usinggetenv

Bojan
Hoff
Honored Contributor

Re: Java on VMS - Retrieving logical names and equivalence names programmatically

Or depending on what (else) you're after, the JNI:

http://labs.hoffmanlabs.com/node/1271
Llewellyn Robinson
New Member

Re: Java on VMS - Retrieving logical names and equivalence names programmatically

My original goal was to be able to search through all logicals on the system that end with "$database", in order to perform some tasks on each Rdb database that the logicals pointed to.

It seems that the JVM will only be allowed access to the logicals that I specify in another logical, thus preventing the ability for my app to automatically discover the databases through these means.

Also, it turns out we're running a JVM too old to use JAVA$GETENV_SYSTEM_LIST etc. We're on 1.5.0-3.

Thanks for your help.
Llewellyn Robinson
New Member

Re: Java on VMS - Retrieving logical names and equivalence names programmatically

The System.getenv() release helps me but doesn't solve my issue completely.
John Gillings
Honored Contributor

Re: Java on VMS - Retrieving logical names and equivalence names programmatically


Llewellyn,
This has always been a hole in the OpenVMS logical name services. There's no documented interface to do wildcard searches of logical name tables. The SHOW LOGICAL command can do it, but there's no $TRNLNM mechanism (and hence, no getenv).

You could parse the output of a SHOW LOGICAL, but that gets very ugly :-(

A crucible of informative mistakes