Operating System - OpenVMS
1753317 Members
4984 Online
108792 Solutions
New Discussion юеВ

Re: Reference count exceeded

 
SOLVED
Go to solution
JHKCMO
Occasional Advisor

Reference count exceeded

OpenVMS 7.3-2
I get this error when I run a command from login.com to change my environment logicals:

Fatal Error -- Reference count for the terminal is 22
reduce the number of processes attached to the terminal
** Returned to previous environment **


However, when I run this command interactively, it works:

$ envset test



** Jumping to environment test **


This happens to two others logging on to this node, all of us using the same user account (a process account we are testing). The only Reference Count I can find is in the terminal device I am logging on with (sho dev NTY130/full), but this count is 2. Where is the "22" stored and is there anyway to clear it? I have verified that there are no processes or users running under this userID, so logging out does not clear this.

Thanks!



11 REPLIES 11
Steven Schweda
Honored Contributor

Re: Reference count exceeded

What are "environment logicals"? And whence
came "envset"? That complaint appears to
come from your program, not from VMS.
Jan van den Ende
Honored Contributor

Re: Reference count exceeded

JHKCMO,

To begin with,

WELCOME to the VMS forum.

Your problem.

Firstly, I _REALLY_ must advise against multiple users using the same account!
In cases like this, ANY treaces of what has happened loose any traceability.

Now, "envset" is NOT a VMS command. I might try to guess what it can do, but I would rather have precise information.
Try
$ show symbol envset
and chances are it will show some more (although it MIGHT by defined as a DCLTABLES addition...)

If iyt is a symbol, and it equates to
"@
pleas locate the , and a copt REMEMED TO .TXT!!!!

Please scan for any @-ed procedures, and if there are not too many, attach those in secundary replies, or, better, make one .TXT file with all of them (clearly indication separate files)

Lets's see what we can get out, eh?

Proost.

Have one on me.

jpe

Don't rust yours pelled jacker to fine doll missed aches.
JHKCMO
Occasional Advisor

Re: Reference count exceeded

envset is an executable (not HP's) that sets logicals from which a user can run software, so 'envset prod' allows a user to run programs from the prod directory and write to the prod database instance, while 'envset test' allows running from and writing to that code environment.

Hope that makes sense. There will never be muiltiple users using this account, just a process on a remote system. For me, the question is why it works interactively, but not from login.com.
Steven Schweda
Honored Contributor

Re: Reference count exceeded

> [...] the question is why it works
> interactively, but not from login.com.

Probably depends on exactly what it does,
which remains a mystery.

Ask the fellow who wrote/supplied it?
David Jones_21
Trusted Contributor
Solution

Re: Reference count exceeded

Sounds like it is using $GETDVI to get the reference count on SYS$INPUT and calling that the 'terminal' reference count. In a command procedure, the $GETDVI call will return the current reference count for disk the file resides on since SYS$INPUT is being redirected to the procedure. Try adding a "$ DEASSIGN SYS$INPUT" command prior to the envset command.

The program in question should really be testing SYS$COMMAND, not SYS$INPUT.
I'm looking for marbles all day long.
JHKCMO
Occasional Advisor

Re: Reference count exceeded

Awesome! Thanks David! I'm left with one remaining problem if someone can help me further. My envset works, but the last command in my login.com does not run after that. I just need to set def to the correct directory.
login.com....
.....
$ ENVSET TEST
$ SET DEF USER01:[DEV1]
$ EXIT

After envset runs, I am in a bogus directory:
$ sho def
$1$DGA1:[DEV1]
%DCL-I-INVDEF, $1$DGA1:[DEV1] does not exist

How can I run that set def command non-interactively after my envset command?

Thanks All!
Steven Schweda
Honored Contributor

Re: Reference count exceeded

> How can I run that set def command
> non-interactively after my envset command?

Probably depends on exactly what it does,
which remains a mystery.

For example, if it creates a new sub-process
for you, then subsequent commands in the
command procedure can't do much until it's
too late.

Why can't you SET DEFAULT _before_ you run
the mystery command?
JHKCMO
Occasional Advisor

Re: Reference count exceeded

I tried that but the envset includes, I believe, a set def command; I'm not sure where it picks this up, but when I set def beforehand, my process is still redirected by envset.
Steven Schweda
Honored Contributor

Re: Reference count exceeded

> I tried that but [...]

I can believe that. It appears that you have
an application problem, not a VMS problem,
and, as we don't even know what that
application is (although Google offers some
possible clues), we don't know what it does,
so the best you can hope for here is an
insightful guess or two. Unless the
application vendor's support is particularly
poor, it's not clear to me why you're asking
about it here rather than there.

For all I know, there's some mystery
configuration file where you can specify a
default directory to be used for environment
"test". I could try reading the manual, if I
had any idea which product we're discussing.