1828667 Members
2090 Online
109984 Solutions
New Discussion

Re: LIB$SET_LOGICAL

 
Rizwan Latheef
Occasional Contributor

LIB$SET_LOGICAL

Iam using lib$set_logical to set a logical in a OPENVMS Basic programme. First time this sets the logical but it does not redefines the logical if it is already set. What needs to be done inorder to redefine the logical if it is already set?
SYS_STATUS = LIB$SET_LOGICAL(RETURN_PRINTQ,WORK::T_PRINTQ,"LNM$PROCESS")
7 REPLIES 7
Steven Schweda
Honored Contributor

Re: LIB$SET_LOGICAL

What is your SYS_STATUS result when the
thing fails?
Dean McGorrill
Valued Contributor

Re: LIB$SET_LOGICAL

what is the status returned on the second
define? also as I remember you can pass an
item list with this call. ( don't remember what the attributes you can set ) Dean
Rizwan Latheef
Occasional Contributor

Re: LIB$SET_LOGICAL

When I examined it in debug I got
before the execution of the comand I got
SYS_STATUS: 1 and after I got
SYS_STATUS: 1585

Dean McGorrill
Valued Contributor

Re: LIB$SET_LOGICAL

$ write sys$output f$message(%D1585)
%SYSTEM-S-SUPERSEDE, logical name superseded
$

it would appear it replaced the logical
for you! Dean
Rizwan Latheef
Occasional Contributor

Re: LIB$SET_LOGICAL

It was expecting "RETURN_PRINTQ" in quotes. When I added quotes it worked.
Jan van den Ende
Honored Contributor

Re: LIB$SET_LOGICAL

Rizwan,

on thamking those that helped you in this forum, please review

http://forums1.itrc.hp.com/service/forums/helptips.do?#33

-- for this as well as your previous questions.

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Hoff
Honored Contributor

Re: LIB$SET_LOGICAL

When system calls go bad or when unexpected behavior arises, the debugger and a small test program can be invaluable.

Create a dozen-line test program -- I have a suspicion that this BASIC sequence is buried in a far larger application -- and then spend some time with the code and the debugger and (for this case) with the SHOW LOGICAL /FULL command.

I'd here wonder if there are any odd characters in the logical name string, or if there is a requirement for a trusted logical name (eg: something else looking at this logical name is running with privileges; the process table isn't easily accessible from installed and privileged code for instance), or if there is a logical name definition "ahead" of this one somewhere in the logical name tables. Either based on the translation table order, or the access mode. (Some of these details can be ascertained with the SHOW LOGICAL /FULL command. Others with the test program.)

Stephen Hoffman
HoffmanLabs LLC