Discussion:
Command Procedure Pipe output to a variable
Add Reply
HCorte
2021-08-31 09:49:45 UTC
Reply
Permalink
Implementing a command procedure that first obtains the device allocated to a process for example purposes called YYYYYY.

How to output the results of (SEARCH SYS$INPUT "Devices allocated") to the variable DEVICEAUX tried (READ SYS$PIPE DEVICEAUX) but with no success.

$ pipe SH PROCESS YYYYYY | SEARCH SYS$INPUT "Devices allocated" | (READ SYS$PIPE DEVICEAUX)
$ WRITE SYS$OUTPUT DEVICEAUX
$ DEVICE_AUX = F$EDIT(F$ELEMENT(1, ":", TEST),"TRIM")
$ WRITE SYS$OUTPUT DEVICE_AUX

can make it work to write to a file
$ pipe SH PROCESS SCMLCOMOLM | SEARCH SYS$PIPE "Devices allocated" > DEVICEAUX.DAT

but would prefer to avoid having to write and read from file if possible, also in command procedure should alls use SYS$PIPE instead of SYS$INPUT?
cao...@pitbulluk.org
2021-08-31 10:43:29 UTC
Reply
Permalink
Post by HCorte
Implementing a command procedure that first obtains the device allocated to a process for example purposes called YYYYYY.
How to output the results of (SEARCH SYS$INPUT "Devices allocated") to the variable DEVICEAUX tried (READ SYS$PIPE DEVICEAUX) but with no success.
$ pipe SH PROCESS YYYYYY | SEARCH SYS$INPUT "Devices allocated" | (READ SYS$PIPE DEVICEAUX)
$ WRITE SYS$OUTPUT DEVICEAUX
$ DEVICE_AUX = F$EDIT(F$ELEMENT(1, ":", TEST),"TRIM")
$ WRITE SYS$OUTPUT DEVICE_AUX
can make it work to write to a file
$ pipe SH PROCESS SCMLCOMOLM | SEARCH SYS$PIPE "Devices allocated" > DEVICEAUX.DAT
but would prefer to avoid having to write and read from file if possible, also in command procedure should alls use SYS$PIPE instead of SYS$INPUT?
The search will only ever return the device name of the most recently allocated device to the process YYYYYY, which will most likely be your pipe device MPAx: because the devices are listed on separate lines.
DEVICEAUX is set in the context of the subprocess created by the pipe so the main process running the script will never see it.

What is the problem you are trying to solve?

Keith
HCorte
2021-08-31 11:05:17 UTC
Reply
Permalink
Post by ***@pitbulluk.org
Post by HCorte
Implementing a command procedure that first obtains the device allocated to a process for example purposes called YYYYYY.
How to output the results of (SEARCH SYS$INPUT "Devices allocated") to the variable DEVICEAUX tried (READ SYS$PIPE DEVICEAUX) but with no success.
$ pipe SH PROCESS YYYYYY | SEARCH SYS$INPUT "Devices allocated" | (READ SYS$PIPE DEVICEAUX)
$ WRITE SYS$OUTPUT DEVICEAUX
$ DEVICE_AUX = F$EDIT(F$ELEMENT(1, ":", TEST),"TRIM")
$ WRITE SYS$OUTPUT DEVICE_AUX
can make it work to write to a file
$ pipe SH PROCESS SCMLCOMOLM | SEARCH SYS$PIPE "Devices allocated" > DEVICEAUX.DAT
but would prefer to avoid having to write and read from file if possible, also in command procedure should alls use SYS$PIPE instead of SYS$INPUT?
The search will only ever return the device name of the most recently allocated device to the process YYYYYY, which will most likely be your pipe device MPAx: because the devices are listed on separate lines.
DEVICEAUX is set in the context of the subprocess created by the pipe so the main process running the script will never see it.
What is the problem you are trying to solve?
Keithremote
Thanks Keith then for now gona go with the solution of writing to a file, in this case for this process the list of devices will alls be one and don't expect to be more. This Devices allocated will serve for matching for the command (sh network "tcp/ip" /full) the column Device_socket and retrieve the value/ip in column Remote Host.
cao...@pitbulluk.org
2021-08-31 11:30:46 UTC
Reply
Permalink
Post by HCorte
Post by ***@pitbulluk.org
Post by HCorte
Implementing a command procedure that first obtains the device allocated to a process for example purposes called YYYYYY.
How to output the results of (SEARCH SYS$INPUT "Devices allocated") to the variable DEVICEAUX tried (READ SYS$PIPE DEVICEAUX) but with no success.
$ pipe SH PROCESS YYYYYY | SEARCH SYS$INPUT "Devices allocated" | (READ SYS$PIPE DEVICEAUX)
$ WRITE SYS$OUTPUT DEVICEAUX
$ DEVICE_AUX = F$EDIT(F$ELEMENT(1, ":", TEST),"TRIM")
$ WRITE SYS$OUTPUT DEVICE_AUX
can make it work to write to a file
$ pipe SH PROCESS SCMLCOMOLM | SEARCH SYS$PIPE "Devices allocated" > DEVICEAUX.DAT
but would prefer to avoid having to write and read from file if possible, also in command procedure should alls use SYS$PIPE instead of SYS$INPUT?
The search will only ever return the device name of the most recently allocated device to the process YYYYYY, which will most likely be your pipe device MPAx: because the devices are listed on separate lines.
DEVICEAUX is set in the context of the subprocess created by the pipe so the main process running the script will never see it.
What is the problem you are trying to solve?
Keithremote
Thanks Keith then for now gona go with the solution of writing to a file, in this case for this process the list of devices will alls be one and don't expect to be more. This Devices allocated will serve for matching for the command (sh network "tcp/ip" /full) the column Device_socket and retrieve the value/ip in column Remote Host.
There may be an ACP style I/O function you can do to query the list of open connections and what processes are connected to them. I vaguely recall doing something similar a long time ago with DECnet and its NETACP. You could also possibly listen for audit or alarm events for network logins and grab the data that way - you'd get the source and the process ID involved. Just a thought.
MG
2021-08-31 10:57:26 UTC
Reply
Permalink
Post by HCorte
Implementing a command procedure that first obtains the device allocated
to a process for example purposes called YYYYYY.
How to output the results of (SEARCH SYS$INPUT "Devices allocated") to
the variable DEVICEAUX tried (READ SYS$PIPE DEVICEAUX) but with no success.
$ pipe SH PROCESS YYYYYY | SEARCH SYS$INPUT "Devices allocated" | (READ SYS$PIPE DEVICEAUX)
$ WRITE SYS$OUTPUT DEVICEAUX
$ DEVICE_AUX = F$EDIT(F$ELEMENT(1, ":", TEST),"TRIM")
$ WRITE SYS$OUTPUT DEVICE_AUX
can make it work to write to a file
$ pipe SH PROCESS SCMLCOMOLM | SEARCH SYS$PIPE "Devices allocated" > DEVICEAUX.DAT
but would prefer to avoid having to write and read from file if possible,
also in command procedure should alls use SYS$PIPE instead of SYS$INPUT?
This is a recurring question and I think just about anyone getting
started with DCL wondered about this at some point in time.

I'm afraid that there's little to nothing 'natively' in DCL (except
of course lexicals) like you'd have in e.g. *n*x Bourne shell, besides
writing to a (temporary) file and. But, besides that, for the rest
nothing but hacks and workarounds that typically involve writing an
external program that can be called to receive the piped data and
write it to one or more symbols. (The latter is what I did myself,
with some varying results.)

- MG
Jim
2021-08-31 12:11:59 UTC
Reply
Permalink
Post by HCorte
Implementing a command procedure that first obtains the device allocated to a process for example purposes called YYYYYY.
How to output the results of (SEARCH SYS$INPUT "Devices allocated") to the variable DEVICEAUX tried (READ SYS$PIPE DEVICEAUX) but with no success.
$ pipe SH PROCESS YYYYYY | SEARCH SYS$INPUT "Devices allocated" | (READ SYS$PIPE DEVICEAUX)
$ WRITE SYS$OUTPUT DEVICEAUX
$ DEVICE_AUX = F$EDIT(F$ELEMENT(1, ":", TEST),"TRIM")
$ WRITE SYS$OUTPUT DEVICE_AUX
can make it work to write to a file
$ pipe SH PROCESS SCMLCOMOLM | SEARCH SYS$PIPE "Devices allocated" > DEVICEAUX.DAT
but would prefer to avoid having to write and read from file if possible, also in command procedure should alls use SYS$PIPE instead of SYS$INPUT?
Maybe pass the value of the SEARCH output back to the parent process using a job logical name...

$ pipe/nosymbol/nological -
show process YYYYYY | -
search sys$pipe "Devices allocated:" | -
( read sys$pipe x ; define/job x &x )
$ device_aux = f$element(1,":",f$edit(f$trnlnm("x","lnm$job"),"collapse"))
$ deassign/job x
$ show symbol device_aux
V***@SendSpamHere.ORG
2021-08-31 12:33:42 UTC
Reply
Permalink
Post by Jim
Post by HCorte
Implementing a command procedure that first obtains the device allocated to a process for example purposes called YYYYYY.
How to output the results of (SEARCH SYS$INPUT "Devices allocated") to the variable DEVICEAUX tried (READ SYS$PIPE DEVICEAUX) but with no success.
$ pipe SH PROCESS YYYYYY | SEARCH SYS$INPUT "Devices allocated" | (READ SYS$PIPE DEVICEAUX)
$ WRITE SYS$OUTPUT DEVICEAUX
$ DEVICE_AUX = F$EDIT(F$ELEMENT(1, ":", TEST),"TRIM")
$ WRITE SYS$OUTPUT DEVICE_AUX
can make it work to write to a file
$ pipe SH PROCESS SCMLCOMOLM | SEARCH SYS$PIPE "Devices allocated" > DEVICEAUX.DAT
but would prefer to avoid having to write and read from file if possible, also in command procedure should alls use SYS$PIPE instead of SYS$INPUT?
Maybe pass the value of the SEARCH output back to the parent process using a job logical name...
$ pipe/nosymbol/nological -
show process YYYYYY | -
search sys$pipe "Devices allocated:" | -
( read sys$pipe x ; define/job x &x )
$ device_aux = f$element(1,":",f$edit(f$trnlnm("x","lnm$job"),"collapse"))
$ deassign/job x
$ show symbol device_aux
Or.., get and install my SYMBOL utility, and then it's simply:

$ PIPE SH PROCESS SCMLCOMOLM | SEARCH SYS$PIPE "Devices allocated" | SYMBOL/SET/QUOTE DEVICEAUX
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.
MG
2021-08-31 15:41:58 UTC
Reply
Permalink
Post by V***@SendSpamHere.ORG
$ PIPE SH PROCESS SCMLCOMOLM | SEARCH SYS$PIPE "Devices allocated" | SYMBOL/SET/QUOTE DEVICEAUX
Where to get it? I'm curious to see how it functions, especially
compared to what I made myself once.

- MG
V***@SendSpamHere.ORG
2021-08-31 19:47:31 UTC
Reply
Permalink
Post by MG
Post by V***@SendSpamHere.ORG
$ PIPE SH PROCESS SCMLCOMOLM | SEARCH SYS$PIPE "Devices allocated" | SYMBOL/SET/QUOTE DEVICEAUX
Where to get it? I'm curious to see how it functions, especially
compared to what I made myself once.
http://tmesis.com/symbol/
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.
Phillip Helbig (undress to reply)
2021-08-31 20:01:36 UTC
Reply
Permalink
Post by V***@SendSpamHere.ORG
Post by MG
Post by V***@SendSpamHere.ORG
$ PIPE SH PROCESS SCMLCOMOLM | SEARCH SYS$PIPE "Devices allocated" | SYMBOL/SET/QUOTE DEVICEAUX
Where to get it? I'm curious to see how it functions, especially
compared to what I made myself once.
http://tmesis.com/symbol/
Nice that the page is visible a) in http and b) in Lynx. However, the
link to the online help doesn't work:

Requested script (helpgate) not found in htbin directory (www_root:[bin])
V***@SendSpamHere.ORG
2021-08-31 22:05:28 UTC
Reply
Permalink
Post by Phillip Helbig (undress to reply)
Post by V***@SendSpamHere.ORG
Post by MG
Post by V***@SendSpamHere.ORG
$ PIPE SH PROCESS SCMLCOMOLM | SEARCH SYS$PIPE "Devices allocated" | SYMBOL/SET/QUOTE DEVICEAUX
Where to get it? I'm curious to see how it functions, especially
compared to what I made myself once.
http://tmesis.com/symbol/
Nice that the page is visible a) in http and b) in Lynx. However, the
Requested script (helpgate) not found in htbin directory (www_root:[bin])
Download and install SYMBOL. You can then read the help. In the interim, I'll
look into why the 'helpgate' is failing.
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.
Jon Pinkley
2021-09-01 23:09:17 UTC
Reply
Permalink
Download and install SYMBOL. You can then read the help. In the interim, I'll
look into why the 'helpgate' is failing.
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG
I speak to machines with the voice of humanity.
As someone that has used TMESIS SYMBOL for more than 25 years, on VAX, Alpha
and Itanium, I will say it is well worth installing it. It's incredibly flexible and useful
for many things. You can see all scope levels of DCL symbols, the global plus 32
local scope levels (0-31), and with appropriate privilege, you can see the dcl symbols
(and procedures) being used by other processes, even processes on other cluster nodes.

If makes debugging batch jobs much easier, because you are able to see the
"dcl variables" in use.

And in addition to reading DCL symbols, you can also set them, a feature that can
be useful to affect a running batch job.

Symbol can also be used to "return" a value to a local DCL symbol in the scope of
the invoker, using symbol /set/local/depth=-1

example: (this may be hard to follow, if you haven't played with DCL scoping)

HP$ show symbol symbol
SYMBOL == "$SYS$SYSDEVICE:[SYMBOL]SYMBOL"
HP$ symbol symbol
[-] SYMBOL == "$SYS$SYSDEVICE:[SYMBOL]SYMBOL"
HP$ write sys$output f$environment("depth")
0
$ abc = "def"
HP$ sho symbol /local abc
ABC = "def"
HP$ @tt
HP$ write sys$output f$environment("depth")
1
_HP$ symbol/show/local/depth=-1
[0] ABC = "def"
_HP$ show symbol /local abc
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
_HP$ show symbol abc
ABC = "def"
_HP$ abc = "xyz"
_HP$ sho sym abc
ABC = "xyz"
_HP$ symbol/show abc
[0] ABC = "def"
[1] ABC = "xyz"
_HP$ symbol/set/local/depth=-1 abc "ghi"
_HP$ sho sym abc
ABC = "xyz"
_HP$ symbol/show abc
[0] ABC = "ghi"
[1] ABC = "xyz"
_HP$ symbol/show/local/depth=-1
[0] ABC = "ghi"
_HP$ exit
HP$ write sys$output f$environment("depth")
0
HP$ sho symbol abc
ABC = "ghi"
HP$ sho symbol /local abc
ABC = "ghi"
HP$

In a command procedure it can even be used to see "who called me", a useful feature
when you are trying to determine what is using a command procedure.

$ symbol/show=(nosymbol,procedure) ! provide a call "traceback"

The point is, SYMBOL can do much more than the specific thing Brian explained.

Highly recommended.
V***@SendSpamHere.ORG
2021-09-02 00:35:54 UTC
Reply
Permalink
Post by Jon Pinkley
Download and install SYMBOL. You can then read the help. In the interim, I'll
look into why the 'helpgate' is failing.
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG
I speak to machines with the voice of humanity.
As someone that has used TMESIS SYMBOL for more than 25 years, on VAX, Alpha
and Itanium, I will say it is well worth installing it. It's incredibly flexible and useful
for many things. You can see all scope levels of DCL symbols, the global plus 32
local scope levels (0-31), and with appropriate privilege, you can see the dcl symbols
(and procedures) being used by other processes, even processes on other cluster nodes.
If makes debugging batch jobs much easier, because you are able to see the
"dcl variables" in use.
You ought to be using my DCL debugger to debug your batch job DCL. With it, you
can single step your DCL procedures and you have SYMBOL-like features and so much
more.
Post by Jon Pinkley
And in addition to reading DCL symbols, you can also set them, a feature that can
be useful to affect a running batch job.
Symbol can also be used to "return" a value to a local DCL symbol in the scope of
the invoker, using symbol /set/local/depth=-1
example: (this may be hard to follow, if you haven't played with DCL scoping)
HP$ show symbol symbol
SYMBOL == "$SYS$SYSDEVICE:[SYMBOL]SYMBOL"
HP$ symbol symbol
[-] SYMBOL == "$SYS$SYSDEVICE:[SYMBOL]SYMBOL"
HP$ write sys$output f$environment("depth")
0
$ abc = "def"
HP$ sho symbol /local abc
ABC = "def"
HP$ write sys$output f$environment("depth")
1
_HP$ symbol/show/local/depth=-1
[0] ABC = "def"
_HP$ show symbol /local abc
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
_HP$ show symbol abc
ABC = "def"
_HP$ abc = "xyz"
_HP$ sho sym abc
ABC = "xyz"
_HP$ symbol/show abc
[0] ABC = "def"
[1] ABC = "xyz"
_HP$ symbol/set/local/depth=-1 abc "ghi"
_HP$ sho sym abc
ABC = "xyz"
_HP$ symbol/show abc
[0] ABC = "ghi"
[1] ABC = "xyz"
_HP$ symbol/show/local/depth=-1
[0] ABC = "ghi"
_HP$ exit
HP$ write sys$output f$environment("depth")
0
HP$ sho symbol abc
ABC = "ghi"
HP$ sho symbol /local abc
ABC = "ghi"
HP$
In a command procedure it can even be used to see "who called me", a useful feature
when you are trying to determine what is using a command procedure.
$ symbol/show=(nosymbol,procedure) ! provide a call "traceback"
The point is, SYMBOL can do much more than the specific thing Brian explained.
Highly recommended.
Thanks for your extolling words.
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.
MG
2021-09-02 09:51:20 UTC
Reply
Permalink
Post by V***@SendSpamHere.ORG
http://tmesis.com/symbol/
Thanks, but I see it's issued as an installation kit, so I can't use
it on DECUServe, since I don't have installation privileges/rights on
there, nor a VMS system of my own. (I'm waiting until the x86 version
of VMS appears for that and for the rest use DECUServe for my needs.)

Is there perhaps also a ‘portable’ version available, somehow; or do
you know if DECUServe was ever granted hobbyist licensing rights to
run it non-commercially, so to speak?

- MG
V***@SendSpamHere.ORG
2021-09-02 13:54:32 UTC
Reply
Permalink
Post by MG
Post by V***@SendSpamHere.ORG
http://tmesis.com/symbol/
Thanks, but I see it's issued as an installation kit, so I can't use
it on DECUServe, since I don't have installation privileges/rights on
there, nor a VMS system of my own. (I'm waiting until the x86 version
of VMS appears for that and for the rest use DECUServe for my needs.)
Is there perhaps also a ‘portable’ version available, somehow; or do
you know if DECUServe was ever granted hobbyist licensing rights to
run it non-commercially, so to speak?
SYMBOL is installed on Eisner (aka DECUServe), so you can use it there to
your heart's content.

DCLdebug is also installed on Eisner. Have fun.
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.
MG
2021-09-02 23:16:01 UTC
Reply
Permalink
Post by V***@SendSpamHere.ORG
SYMBOL is installed on Eisner (aka DECUServe), so you can use it there to
your heart's content.
DCLdebug is also installed on Eisner. Have fun.
Thank you and that's fascinating actually, I actually came across
"SYMBOL" before (when I was looking through the 'global' symbol
definitions), then ran it briefly. At the time I didn't realize
that you made it and I looked at it earlier and I must say it's
very nice and useful.

VSI ought to consider contacting you in order to propose and then
to hopefully reach some kind of deal to be able to integrate your
program into the base VMS operating system, a bit like what
happened with the LD driver at some point.

- MG
V***@SendSpamHere.ORG
2021-09-02 14:11:31 UTC
Reply
Permalink
One more question finished the command procedure, know whanted to pass a variable/symbol to a program in fortran.
Posted the question in "comp.lang.fortran" but forgoted to specify in the initial inquiry/question that was using OpenVMS.
One suggestion was to use "EXECUTE_COMMAND_LINE" that from what could tell its specific to Unix, and also "popen" from what could get also Unix specific is there a equivalent for OpenVMS?
$ FORTRAN /VERSION
HP Fortran V8.2-104939-50H96
$ SHOW SYSTEM
OpenVMS V8.4
There are several ways.

You could employ the CLI$ routines and your own command definition (.CLD).

... or...

You could place the value in a DCL symbol and then, in your program, call
LIB$GET_SYMBOL.

... or...

You could also use LIB$GET_FOREIGN or LIB$GET_INPUT to obtain a value for
use in your program.

... or...

Not knowing your Fortran program, you could also use a Fortran READ. If
it's in a DCL procedure, $ DEFINE/USER SYS$INPUT SYS$COMMAND just before
you run your Fortran program.
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.
Dave Froble
2021-09-02 14:12:47 UTC
Reply
Permalink
One more question finished the command procedure, know whanted to pass a variable/symbol to a program in fortran.
Posted the question in "comp.lang.fortran" but forgoted to specify in the initial inquiry/question that was using OpenVMS.
One suggestion was to use "EXECUTE_COMMAND_LINE" that from what could tell its specific to Unix, and also "popen" from what could get also Unix specific is there a equivalent for OpenVMS?
$ FORTRAN /VERSION
HP Fortran V8.2-104939-50H96
$ SHOW SYSTEM
OpenVMS V8.4
If I understand your question, perhaps LIB$SPAWN is what you're looking for.

Or, to get the value of a symbol, use LIB$GETSYMBOL.
--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: ***@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486
Arne Vajhøj
2021-09-02 14:18:45 UTC
Reply
Permalink
One more question finished the command procedure, know whanted to
pass a variable/symbol to a program in fortran. Posted the question
in "comp.lang.fortran" but forgoted to specify in the initial
inquiry/question that was using OpenVMS.
One suggestion was to use "EXECUTE_COMMAND_LINE" that from what could
tell its specific to Unix, and also "popen" from what could get also
Unix specific is there a equivalent for OpenVMS?
$ FORTRAN /VERSION HP Fortran V8.2-104939-50H96
$ SHOW SYSTEM OpenVMS V8.4
You need to pass from DCL to Fortran?

If DCL get info and then run Fortran program there
are plenty of options:
- call Fortran program with argument
- set symbol and let Fortran call LIB$GET_SYMBOL
- define logical in process table and let Fortran call SYS$TRNLNM

If DCL and Fortran are running in different processes
then:
- define logical in job/group table and let Fortran call SYS$TRNLNM

Arne
Arne Vajhøj
2021-09-02 18:03:55 UTC
Reply
Permalink
Thanks thats whant I needed, gona use LIB$SPAWN to run my command procedure and after get the symbol use LIB$GET_SYMBOL as suggested.
I think you will need logical!

$ type tf1.com
$ z == "ABC"
$ exit
$ type tf1.for
program tf1
character*256 s
integer*4 slen
call lib$spawn('@tf1')
call lib$get_symbol('z', s, slen)
write(*,*) s(1:slen)
end
$ for tf1
$ link tf1
$ run tf1
$ z == "ABC"
$ exit

$ type tf2.com
$ def/nolog/job z "ABC"
$ exit
$ type tf2.for
program tf2
character*256 s
integer*4 slen
call lib$spawn('@tf2')
call lib$get_logical('Z', s, slen)
write(*,*) s(1:slen)
end
$ for tf2
$ link tf2
$ run tf2
$ def/nolog/job z "ABC"
$ exit
ABC

Arne
Stephen Hoffman
2021-09-02 16:01:40 UTC
Reply
Permalink
One more question finished the command procedure, know whanted to pass
a variable/symbol to a program in fortran.
DCL commonly uses symbols, and logical names, and files. DECnet is also
easy, IP and SSL/TLS connections lack good support.

For Fortran, reading values from DCL symbols (lib$get_symbol),
translating values from logical names (lib$get_logical), reading the
data from the command input (works when in command procedures), reading
the input from a file (generic Fortran file I/O, or using RMS from
Fortran), reading the input from the DCL output directly, and reading
the input from a network link (DECnet, as DCL doesn't play well with
UDP, TCP, SSL/TLS), etc.

Same as usual for reading input with any other Fortran programs on OpenVMS.

Here, lib$get_symbol and lib$get_logical calls are probably the most
direct path, though I'd be tempted to use a file (possibly with
delete-on-close disposition), given you're seemingly working with a
list, and given the available Fortran sequential file I/O support.

Biggest issue with Fortran for some of these cases tends to be parsing
data, as Fortran doesn't handle variable-length data all that well.

The Fortran user's manual is probably a good starting point for
learning about your options and alternatives when using Fortran on
OpenVMS:
https://vmssoftware.com/docs/VSI_FORTRAN_USER.pdf

As it can be inferred you're not completely comfortable with OpenVMS
and particularly with OpenVMS programming, some other documentation:
https://vmssoftware.com/docs/VSI_USERS_MANUAL.pdf
https://vmssoftware.com/docs/VSI_PROGRAM_CONCEPTS_VOL_I.pdf
https://vmssoftware.com/docs/VSI_PROGRAM_CONCEPTS_VOL_II.pdf

And since I've filled this reply with RTL calls, and this in
conjunction with the Fortran user's manual (above):
https://vmssoftware.com/docs/VSI_RTL_LIB$_MANUAL.pdf
Posted the question in "comp.lang.fortran" but forgoted to specify in
the initial inquiry/question that was using OpenVMS.
One suggestion was to use "EXECUTE_COMMAND_LINE" that from what could
tell its specific to Unix, and also "popen" from what could get also
Unix specific is there a equivalent for OpenVMS?
If you're invoking the procedure directly—and I'm still not entirely
clear about what this whole thread is trying to achieve—then calling
lib$spawn is one possibility, though there are others.
$ FORTRAN /VERSION
HP Fortran V8.2-104939-50H96
$ SHOW SYSTEM
OpenVMS V8.4
That's all past a dozen years old, and the HP/HPE OpenVMS versions are
no longer receiving patches.

V8.4-2L1 (Alpha EV56 and older), V8.4-2L2, (Alpha EV6 and EV7), and
V8.4-2L3 (Itanium) are current, as is VSI Fortran V8.3-3.
--
Pure Personal Opinion | HoffmanLabs LLC
Dave Froble
2021-09-02 22:39:12 UTC
Reply
Permalink
Post by Stephen Hoffman
One more question finished the command procedure, know whanted to pass
a variable/symbol to a program in fortran.
DCL commonly uses symbols, and logical names, and files. DECnet is also
easy, IP and SSL/TLS connections lack good support.
Where is Stephen and what have you done with him ? :-)
Did anyone else notice that this imposter is recommending the OP
consider using DECnet ? :-)
Simon.
PS: $ set response/mode=good_natured just in case it is required. :-)
DECnet has it's uses. If it works, work it ...

DECnet also has it's deficiencies.

Simon has his deficiencies.

Does Simon have any uses?
--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: ***@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486
V***@SendSpamHere.ORG
2021-09-03 20:41:46 UTC
Reply
Permalink
Post by Dave Froble
DECnet has it's uses. If it works, work it ...
DECnet also has it's deficiencies.
Simon has his deficiencies.
Does Simon have any uses?
Well, Simon certainly thinks so. :-)
In the 1980s, DECnet's good points outweighed its bad points.
In the changed world of 2021, that is no longer true.
Good points that haven't been outweighed...

When will TCP/IP support record access?

When will TCP/IP support $@<node>::<device>:[<directory>]<filename>.COM?
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.
Dave Froble
2021-09-03 21:33:21 UTC
Reply
Permalink
Post by Dave Froble
DECnet has it's uses. If it works, work it ...
DECnet also has it's deficiencies.
Simon has his deficiencies.
Does Simon have any uses?
Well, Simon certainly thinks so. :-)
In the 1980s, DECnet's good points outweighed its bad points.
In the changed world of 2021, that is no longer true.
Simon.
Doesn't that sort of depend on what one wishes to use it for?
--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: ***@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486
Dave Froble
2021-09-03 21:36:58 UTC
Reply
Permalink
Post by Dave Froble
DECnet has it's uses. If it works, work it ...
DECnet also has it's deficiencies.
Simon has his deficiencies.
Does Simon have any uses?
Well, Simon certainly thinks so. :-)
In the 1980s, DECnet's good points outweighed its bad points.
In the changed world of 2021, that is no longer true.
Simon.
Might I suggest that DECnet is as good as it's ever been. What you're
calling "bad points" is more like an omission than a bad point.

Name one thing on this planet that has "everything".
--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: ***@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486
Simon Clubley
2021-09-06 12:24:37 UTC
Reply
Permalink
Post by Dave Froble
In the 1980s, DECnet's good points outweighed its bad points.
In the changed world of 2021, that is no longer true.
Might I suggest that DECnet is as good as it's ever been. What you're
calling "bad points" is more like an omission than a bad point.
The world changed David, but DECnet did not.

Just one example: the implementation of proxies in DECnet opens up
a _massive_ security hole in today's world as DECnet was designed
in a world where you assumed 100% trust in the network and in all
the devices attached to it.

This is because there are no shared secrets or certificates between
the nodes which have proxies between them so it is trivial for someone
with any access to the network to impersonate a DECnet node, if they
manage to disable the real node (to avoid conflicting MAC addresses
and to avoid responses from the real node) or if the real node is not
online all the time.

The idea that a machine can impersonate a server simply by using the
same network address without needing any other information such as
certificates or shared secrets is unacceptable today.

Outside of that, DECnet itself is about as secure as Telnet or plain
FTP and we all know how those two protocols are regarded on internal
networks these days...

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
Scott Dorsey
2021-09-06 14:52:04 UTC
Reply
Permalink
Post by Simon Clubley
Just one example: the implementation of proxies in DECnet opens up
a _massive_ security hole in today's world as DECnet was designed
in a world where you assumed 100% trust in the network and in all
the devices attached to it.
There are still plenty of networks where you can make that assumption.
The internet is not one. But not everything is the internet, no matter
how hard the "cloud people" try to make everyone think it is.

A lot of bad things happened in the opening of the internet when protocols
designed that way suddenly had to be used over untrusted links. Even worse
stuff happened to the telephone network when SS7 was extended onto untrusted
links. But not all networks have untrusted links.
Post by Simon Clubley
The idea that a machine can impersonate a server simply by using the
same network address without needing any other information such as
certificates or shared secrets is unacceptable today.
It's certainly unacceptable on the internet, but not everything is the
internet.
--scott
--
"C'est un Nagra. C'est suisse, et tres, tres precis."
Arne Vajhøj
2021-09-06 23:38:38 UTC
Reply
Permalink
Post by Scott Dorsey
Post by Simon Clubley
Just one example: the implementation of proxies in DECnet opens up
a _massive_ security hole in today's world as DECnet was designed
in a world where you assumed 100% trust in the network and in all
the devices attached to it.
There are still plenty of networks where you can make that assumption.
The internet is not one. But not everything is the internet, no matter
how hard the "cloud people" try to make everyone think it is.
A lot of bad things happened in the opening of the internet when protocols
designed that way suddenly had to be used over untrusted links. Even worse
stuff happened to the telephone network when SS7 was extended onto untrusted
links. But not all networks have untrusted links.
Post by Simon Clubley
The idea that a machine can impersonate a server simply by using the
same network address without needing any other information such as
certificates or shared secrets is unacceptable today.
It's certainly unacceptable on the internet, but not everything is the
internet.
There are lots of networks where outsider hackers do not have
access.

But when you start worrying about insider hackers then it becomes
more problematic.

Arne
Scott Dorsey
2021-09-07 01:57:51 UTC
Reply
Permalink
Post by Arne Vajhøj
There are lots of networks where outsider hackers do not have
access.
But when you start worrying about insider hackers then it becomes
more problematic.
The problem is that, although internal network encryption and data
compartmentalization can help a little bit against internal attacks,
in the end it almost always breaks down.

There is really very little that anyone can do about internal attacks
other than to pay their employees well and treat them with respect.
Surprisingly, a lot of companies find these two things nearly impossible
to implement.
--scott
--
"C'est un Nagra. C'est suisse, et tres, tres precis."
Arne Vajhøj
2021-09-07 12:37:54 UTC
Reply
Permalink
Post by Scott Dorsey
Post by Arne Vajhøj
There are lots of networks where outsider hackers do not have
access.
But when you start worrying about insider hackers then it becomes
more problematic.
The problem is that, although internal network encryption and data
compartmentalization can help a little bit against internal attacks,
in the end it almost always breaks down.
There is really very little that anyone can do about internal attacks
other than to pay their employees well and treat them with respect.
Surprisingly, a lot of companies find these two things nearly impossible
to implement.
It is difficulty to protect against insiders, but I do not see that as
a valid excuse for not adding some measures.

Just imagine the argument "It is difficult to protect against insiders
so we we are OK with all VMS users having SETPRV".

Nobody would buy that.

My biggest concern with the focus on plain text passwords and
non authenticating network protocols is what that focus could
have been used on instead.

If prioritizing between that stuff and let us say application
security and third party software patching, then that stuff is
less important.

The problem is that it is way easier to focus on that stuff.

Arne
Dave Froble
2021-09-06 14:55:38 UTC
Reply
Permalink
Post by Simon Clubley
Post by Dave Froble
In the 1980s, DECnet's good points outweighed its bad points.
In the changed world of 2021, that is no longer true.
Might I suggest that DECnet is as good as it's ever been. What you're
calling "bad points" is more like an omission than a bad point.
The world changed David, but DECnet did not.
Yeah, that's right, so? Sort of what I wrote ...
Post by Simon Clubley
Just one example: the implementation of proxies in DECnet opens up
a _massive_ security hole in today's world as DECnet was designed
in a world where you assumed 100% trust in the network and in all
the devices attached to it.
This is because there are no shared secrets or certificates between
the nodes which have proxies between them so it is trivial for someone
with any access to the network to impersonate a DECnet node, if they
manage to disable the real node (to avoid conflicting MAC addresses
and to avoid responses from the real node) or if the real node is not
online all the time.
The idea that a machine can impersonate a server simply by using the
same network address without needing any other information such as
certificates or shared secrets is unacceptable today.
Outside of that, DECnet itself is about as secure as Telnet or plain
FTP and we all know how those two protocols are regarded on internal
networks these days...
As I wrote, an omission.

Do you have all that stuff as boilerplate somewhere, so you can cut n
paste every day or two?
--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: ***@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486
V***@SendSpamHere.ORG
2021-09-07 13:19:48 UTC
Reply
Permalink
Post by Dave Froble
Post by Simon Clubley
Post by Dave Froble
In the 1980s, DECnet's good points outweighed its bad points.
In the changed world of 2021, that is no longer true.
Might I suggest that DECnet is as good as it's ever been. What you're
calling "bad points" is more like an omission than a bad point.
The world changed David, but DECnet did not.
Yeah, that's right, so? Sort of what I wrote ...
Post by Simon Clubley
Just one example: the implementation of proxies in DECnet opens up
a _massive_ security hole in today's world as DECnet was designed
in a world where you assumed 100% trust in the network and in all
the devices attached to it.
This is because there are no shared secrets or certificates between
the nodes which have proxies between them so it is trivial for someone
with any access to the network to impersonate a DECnet node, if they
manage to disable the real node (to avoid conflicting MAC addresses
and to avoid responses from the real node) or if the real node is not
online all the time.
The idea that a machine can impersonate a server simply by using the
same network address without needing any other information such as
certificates or shared secrets is unacceptable today.
Outside of that, DECnet itself is about as secure as Telnet or plain
FTP and we all know how those two protocols are regarded on internal
networks these days...
As I wrote, an omission.
Do you have all that stuff as boilerplate somewhere, so you can cut n
paste every day or two?
My buddy Simon has completely ignored my comments on record oriented access
over DECnet. I believe he speaks and types only to hear and read himself.
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.
Simon Clubley
2021-09-07 17:58:10 UTC
Reply
Permalink
Post by V***@SendSpamHere.ORG
My buddy Simon has completely ignored my comments on record oriented access
over DECnet. I believe he speaks and types only to hear and read himself.
As you should well know Brian, using an insecure protocol in an insecure
environment just because of a certain feature is utterly irresponsible
from a security point of view.

This isn't even appropriate any more for protocols that offer major
unique functionality such as VMS clusters. Why do you think VSI,
with everything else they need to do, are investing time and effort
into adding a secure layer to the clustering protocol ?

No, you should look for alternatives or find a different way to do
things. That's why telnet is banned (for example) and ssh is enforced
on many networks today. Everyone else manages to solve data sharing
problems using secure techniques available on those other platforms.
If VMS doesn't have those secure options, then that's a failing in VMS.

BTW, record access is a feature that is a unique VMS requirement. You could
try the VMS versions of NFS which supports the storing of VMS attributes.
However, do any of the VMS NFS implementations support the NFS 4 protocol
with secure links ?

As for file sharing in general, other people do it by using clustering
protocols, remotely mounting filesystems or just copying the files.
Examples include NFS, Samba, and GFS2.

Linux has also recently acquired the ability to mount filesystems over
SSH, but you are unlikely to ever see that in VMS due to VMS's utter
inability to support userspace filesystems.

Times have changed and VMS needs to keep up with those times if it
is to remain usable in many of today's environments. Telling everyone
else to stand still so that VMS can still play is not a viable approach.

One final question: If DAP would be so wonderful to the world in general,
then why isn't there a TCP/IP version of DAP ? (WebDAV doesn't really
count IMHO unless it's moved on recently). There's a standardised TCP/IP
version of every other application protocol.

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
Arne Vajhøj
2021-09-07 20:55:18 UTC
Reply
Permalink
Post by Simon Clubley
One final question: If DAP would be so wonderful to the world in
general, then why isn't there a TCP/IP version of DAP ? (WebDAV
doesn't really count IMHO unless it's moved on recently). There's a
standardised TCP/IP version of every other application protocol.
The FAL/DAP analog is called ODBC, and the ODBC CLI API.
libferris (inactive) has the sorts of features that FAL/DAP might have
had added, after substantial new development work.  Or Plan 9, the Unix
analog to what DEC MICA was to OpenVMS, of course.
For those not needing ODBC or libferris or ilk, SMB and other shares
meet the requirements for many if not most users.
VSI could certainly provide an ODBC client within RMS and an ODBC server
akin to the DECnet FAL server. Or could route DAP over IP SSL/TLS if
they were inclined. (Though IP integration on OpenVMS is weak, and
SSL/TLS weaker.) Or the flexibility of something like the libferris
FUSE. Having an SMB client would be nice, as many sites have substantial
investments in SMB servers. But I digress.
ODBC is a relational database API and pretty far from
DECnet file access in my opinion. ODBC to an index-sequential
file makes sense and I believe that such exist. But the
data model for a sequential files does not match with ODBC.

If write access to a sequential file is needed then I think
alternatives would be SMB mount or NFS mount. Read access
could be provided by one of the common file download protocols.

Arne
Dave Froble
2021-09-08 07:05:16 UTC
Reply
Permalink
Post by Simon Clubley
Post by V***@SendSpamHere.ORG
My buddy Simon has completely ignored my comments on record oriented access
over DECnet. I believe he speaks and types only to hear and read himself.
As you should well know Brian, using an insecure protocol in an insecure
environment just because of a certain feature is utterly irresponsible
from a security point of view.
Ayep! It's boilerplate ...
Post by Simon Clubley
This isn't even appropriate any more for protocols that offer major
unique functionality such as VMS clusters. Why do you think VSI,
with everything else they need to do, are investing time and effort
into adding a secure layer to the clustering protocol ?
Appropriate depends on usage, right?
Post by Simon Clubley
No, you should look for alternatives or find a different way to do
things.
Why? If the usage doesn't have downsides, then why not use it?
Post by Simon Clubley
That's why telnet is banned (for example) and ssh is enforced
on many networks today.
Where outside security is required, sure. Otherwise, Telnet works just
fine.
Post by Simon Clubley
Everyone else manages to solve data sharing
problems using secure techniques available on those other platforms.
If they need to, sure.
Post by Simon Clubley
If VMS doesn't have those secure options, then that's a failing in VMS.
Omission, not failing ...
Post by Simon Clubley
BTW, record access is a feature that is a unique VMS requirement.
Yep, we got it, and you don't. Eat your heart out ...
Post by Simon Clubley
You could
try the VMS versions of NFS which supports the storing of VMS attributes.
However, do any of the VMS NFS implementations support the NFS 4 protocol
with secure links ?
As for file sharing in general, other people do it by using clustering
protocols, remotely mounting filesystems or just copying the files.
Examples include NFS, Samba, and GFS2.
Don't like them.
Post by Simon Clubley
Linux has also recently acquired the ability to mount filesystems over
SSH, but you are unlikely to ever see that in VMS due to VMS's utter
inability to support userspace filesystems.
Don't like Linux.
Post by Simon Clubley
Times have changed and VMS needs to keep up with those times if it
is to remain usable in many of today's environments.
Nothing is usable everywhere.
Post by Simon Clubley
Telling everyone
else to stand still so that VMS can still play is not a viable approach.
Who is telling anyone to stand still?
Post by Simon Clubley
One final question: If DAP would be so wonderful to the world in general,
then why isn't there a TCP/IP version of DAP ? (WebDAV doesn't really
count IMHO unless it's moved on recently). There's a standardised TCP/IP
version of every other application protocol.
Perhaps some don't realize what they are missing?
--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: ***@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486
Simon Clubley
2021-09-08 12:20:21 UTC
Reply
Permalink
Post by Dave Froble
Post by Simon Clubley
Post by V***@SendSpamHere.ORG
My buddy Simon has completely ignored my comments on record oriented access
over DECnet. I believe he speaks and types only to hear and read himself.
As you should well know Brian, using an insecure protocol in an insecure
environment just because of a certain feature is utterly irresponsible
from a security point of view.
Ayep! It's boilerplate ...
No. It's saying the things that need to be said.
Post by Dave Froble
Post by Simon Clubley
This isn't even appropriate any more for protocols that offer major
unique functionality such as VMS clusters. Why do you think VSI,
with everything else they need to do, are investing time and effort
into adding a secure layer to the clustering protocol ?
Appropriate depends on usage, right?
No. It also depends on environment.
Post by Dave Froble
Post by Simon Clubley
No, you should look for alternatives or find a different way to do
things.
Why? If the usage doesn't have downsides, then why not use it?
Downsides increase over time, if something remains static while everything
else changes around it.
Post by Dave Froble
Post by Simon Clubley
That's why telnet is banned (for example) and ssh is enforced
on many networks today.
Where outside security is required, sure. Otherwise, Telnet works just
fine.
Telnet is banned on many internal networks these days when the target
is an internal server. If you don't understand why, then you don't
understand the problem.
Post by Dave Froble
Post by Simon Clubley
You could
try the VMS versions of NFS which supports the storing of VMS attributes.
However, do any of the VMS NFS implementations support the NFS 4 protocol
with secure links ?
As for file sharing in general, other people do it by using clustering
protocols, remotely mounting filesystems or just copying the files.
Examples include NFS, Samba, and GFS2.
Don't like them.
Would you prefer to go back to the days of UUCP links ? :-)
Post by Dave Froble
Post by Simon Clubley
Linux has also recently acquired the ability to mount filesystems over
SSH, but you are unlikely to ever see that in VMS due to VMS's utter
inability to support userspace filesystems.
Don't like Linux.
Very short sighted. There are things which have been added to Linux
to address current security issues that VMS could well do with.
Post by Dave Froble
Post by Simon Clubley
Times have changed and VMS needs to keep up with those times if it
is to remain usable in many of today's environments.
Nothing is usable everywhere.
If VMS is to remain viable, it needs to be usable in today's world.
Post by Dave Froble
Post by Simon Clubley
Telling everyone
else to stand still so that VMS can still play is not a viable approach.
Who is telling anyone to stand still?
Everytime someone says a 30-year-old network security model in VMS
is still viable for use on networks today.

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
Lawrence D’Oliveiro
2021-09-22 07:59:17 UTC
Reply
Permalink
Post by Simon Clubley
Linux has also recently acquired the ability to mount filesystems over
SSH, but you are unlikely to ever see that in VMS due to VMS's utter
inability to support userspace filesystems.
I think how that actually works is that Linux has long implemented filesystems through a VFS indirection layer, which is how it’s able to handle all kinds of different volume formats (e.g. DOS FAT, ISO 9660, Apple HFS+, Windows NTFS, old IRIX XFS, MINIX etc). But these would normally all require in-kernel drivers. So FUSE (“Filesystem in Userspace”) implements a single generic in-kernel filesystem driver on top of VFS, that offers an API to userland processes. And this is used by a whole bunch of additional packages like sshfs, mtpfs, winregfs etc. In fact, the FUSE version of NTFS is actually more full-featured than the kernel version.
Simon Clubley
2021-09-22 12:40:57 UTC
Reply
Permalink
Post by Simon Clubley
Linux has also recently acquired the ability to mount filesystems over
SSH, but you are unlikely to ever see that in VMS due to VMS's utter
inability to support userspace filesystems.
I think how that actually works is that Linux has long implemented filesystems through a VFS indirection layer, which is how it?s able to handle all kinds of different volume formats (e.g. DOS FAT, ISO 9660, Apple HFS+, Windows NTFS, old IRIX XFS, MINIX etc). But these would normally all require in-kernel drivers. So FUSE (?Filesystem in Userspace?) implements a single generic in-kernel filesystem driver on top of VFS, that offers an API to userland processes. And this is used by a whole bunch of additional packages like sshfs, mtpfs, winregfs etc. In fact, the FUSE version of NTFS is actually more full-featured than the kernel version.
Yes, that's how it works.

VMS has absolutely nothing like the FUSE support Linux does.

It does have ACPs to handle some _devices_ in process context, but they
are nothing like FUSE and ACPs are very ugly to implement anyway.
Also, good luck finding any public documentation for writing an ACP.

VMS doesn't even have anything like the filesystem kernel plugin modules
that you see in Linux and elsewhere. The VMS architecture simply isn't
setup to support anything like that.

BTW, did you know that once you load a device driver into VMS, you
can't even remove it unlike what you can do elsewhere ?

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
abrsvc
2021-09-22 15:44:18 UTC
Reply
Permalink
Post by Simon Clubley
BTW, did you know that once you load a device driver into VMS, you
can't even remove it unlike what you can do elsewhere ?
Simon.
The above statement is not 100% true. There are some drivers that can be unloaded. Granted these are few, but the mechanism is there, but rarely used.
Stephen Hoffman
2021-09-22 17:13:25 UTC
Reply
Permalink
Post by abrsvc
Post by Simon Clubley
BTW, did you know that once you load a device driver into VMS, you
can't even remove it unlike what you can do elsewhere ?
The above statement is not 100% true. There are some drivers that can
be unloaded. Granted these are few, but the mechanism is there, but
rarely used.
AFAIK, there's no supported means to remove an OpenVMS device driver.

It is possible to remove device units for template devices. But that
does not remove the device driver.

And it was possible—though AFAIK now entirely unsupported—to code a
device driver to tolerate re-loading with SYSGEN RELOAD. Usually.

There might once have been some UNLOAD hooks around.

AFAIK, there's no API to quiesce an OpenVMS driver and to allow the
driver to complete or to cancel its pending I/O operations and to
deallocate resources.

Semi-related alternatives from elsewhere:

Linux added no-reboot support for patching a while back. Search targets
for different Linux distros include LivePatch, Kpatch, Ksplice, Kgraft,
KernelCare.

kexec replaces the running kernel with a different kernel, a form of
rebooting without a trip through the console.

Various hypervisors can fail over to a second hypervisor host
dynamically, though it remains to be seen if that will work with
OpenVMS on x86-64, or with clustered OpenVMS hosts on x86-64.
--
Pure Personal Opinion | HoffmanLabs LLC
Simon Clubley
2021-09-22 17:16:23 UTC
Reply
Permalink
Post by abrsvc
Post by Simon Clubley
BTW, did you know that once you load a device driver into VMS, you
can't even remove it unlike what you can do elsewhere ?
Simon.
The above statement is not 100% true. There are some drivers that can be unloaded. Granted these are few, but the mechanism is there, but rarely used.
Excellent Dan. For Alpha what is the unload command I use and where
is this documented ? How exactly does this command trigger the execution
of unload code in the driver so the driver can clean up its resource
use prior to the final unload ?

Also, do you happen to know why, when I have mentioned this in the past,
I was told it wasn't possible ?

Thanks,

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
abrsvc
2021-09-22 17:22:10 UTC
Reply
Permalink
Post by Simon Clubley
Post by Simon Clubley
BTW, did you know that once you load a device driver into VMS, you
can't even remove it unlike what you can do elsewhere ?
Simon.
The above statement is not 100% true. There are some drivers that can be unloaded. Granted these are few, but the mechanism is there, but rarely used.
Excellent Dan. For Alpha what is the unload command I use and where
is this documented ? How exactly does this command trigger the execution
of unload code in the driver so the driver can clean up its resource
use prior to the final unload ?
Also, do you happen to know why, when I have mentioned this in the past,
I was told it wasn't possible ?
Thanks,
Simon.
--
Walking destinations on a map are further away than they appear.
I don't have a recent example as I have not been involved of late with drivers. However, the ability is there if the driver is written to handle it. I never said that any of the standard drivers supplied as part of OpenVMS could do this as I am not aware of one that can. However, making a statement that this is not possible is in fact, false. There have been drivers in the past that could be unloaded and I am sure that one could be written today that could as well.
Simon Clubley
2021-09-22 17:33:40 UTC
Reply
Permalink
Post by abrsvc
I don't have a recent example as I have not been involved of late with drivers. However, the ability is there if the driver is written to handle it. I never said that any of the standard drivers supplied as part of OpenVMS could do this as I am not aware of one that can. However, making a statement that this is not possible is in fact, false. There have been drivers in the past that could be unloaded and I am sure that one could be written today that could as well.
Actually, I'm talking about support in VMS for such a feature, not
whether it is in the standard drivers or not.

Back when I was writing drivers on Alpha VMS as part of hobby projects,
I would have loved the ability to do that, but I was told here that it
wasn't possible.

I was told that VAX/VMS had some basic form of unload or reload capability
but even that limited capability was not included in later versions of VMS.

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
Stephen Hoffman
2021-09-22 17:43:52 UTC
Reply
Permalink
Post by Simon Clubley
It does have ACPs to handle some _devices_ in process context, but they
are nothing like FUSE and ACPs are very ugly to implement anyway.
Also, good luck finding any public documentation for writing an ACP.
I've written a number of ACPs. They're not ~too bad. Some of the
debugging tips I've posed over the years arise from debugging ACPs.

What little ACP doc is available (the VMS Advanced Driver Techniques
book, etc) alone won't get you past writing your own MOUNT though.

Both for mounting your non-file-structured devices, and for use with
different file systems.

In various ways, assumptions in MOUNT are tied more deeply into the
file system than is the design of the ACP APIs.
--
Pure Personal Opinion | HoffmanLabs LLC
V***@SendSpamHere.ORG
2021-09-07 23:36:28 UTC
Reply
Permalink
Post by Simon Clubley
Post by V***@SendSpamHere.ORG
My buddy Simon has completely ignored my comments on record oriented access
over DECnet. I believe he speaks and types only to hear and read himself.
As you should well know Brian, using an insecure protocol in an insecure
environment just because of a certain feature is utterly irresponsible
from a security point of view.
This isn't even appropriate any more for protocols that offer major
unique functionality such as VMS clusters. Why do you think VSI,
with everything else they need to do, are investing time and effort
into adding a secure layer to the clustering protocol ?
No, you should look for alternatives or find a different way to do
things. That's why telnet is banned (for example) and ssh is enforced
on many networks today. Everyone else manages to solve data sharing
problems using secure techniques available on those other platforms.
If VMS doesn't have those secure options, then that's a failing in VMS.
BTW, record access is a feature that is a unique VMS requirement. You could
try the VMS versions of NFS which supports the storing of VMS attributes.
However, do any of the VMS NFS implementations support the NFS 4 protocol
with secure links ?
As for file sharing in general, other people do it by using clustering
protocols, remotely mounting filesystems or just copying the files.
Examples include NFS, Samba, and GFS2.
Linux has also recently acquired the ability to mount filesystems over
SSH, but you are unlikely to ever see that in VMS due to VMS's utter
inability to support userspace filesystems.
Times have changed and VMS needs to keep up with those times if it
is to remain usable in many of today's environments. Telling everyone
else to stand still so that VMS can still play is not a viable approach.
One final question: If DAP would be so wonderful to the world in general,
then why isn't there a TCP/IP version of DAP ? (WebDAV doesn't really
count IMHO unless it's moved on recently). There's a standardised TCP/IP
version of every other application protocol.
Simon.
Thank you for proving my point.
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.
Phillip Helbig (undress to reply)
2021-09-07 16:16:29 UTC
Reply
Permalink
Post by V***@SendSpamHere.ORG
My buddy Simon has completely ignored my comments on record oriented access
over DECnet. I believe he speaks and types only to hear and read himself.
I remember a game called Simon Says. :-)
Simon Clubley
2021-09-07 18:03:44 UTC
Reply
Permalink
Post by Phillip Helbig (undress to reply)
Post by V***@SendSpamHere.ORG
My buddy Simon has completely ignored my comments on record oriented access
over DECnet. I believe he speaks and types only to hear and read himself.
I remember a game called Simon Says. :-)
Hey! You are the guy who refuses to use anything other than a LK
keyboard and claims to have stockpiled decades worth of replacements
because he's so stuck in his ways. :-)

You are also the guy who still thinks that VMS workstations are a
viable desktop computer... :-)

I, OTOH, actively look at new ideas to see if they have any good parts
to them that I can use or if they are just a fad that will die off within
a couple of years...

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
Bill Gunshannon
2021-09-07 18:14:14 UTC
Reply
Permalink
Post by Simon Clubley
Post by Phillip Helbig (undress to reply)
Post by V***@SendSpamHere.ORG
My buddy Simon has completely ignored my comments on record oriented access
over DECnet. I believe he speaks and types only to hear and read himself.
I remember a game called Simon Says. :-)
Hey! You are the guy who refuses to use anything other than a LK
keyboard and claims to have stockpiled decades worth of replacements
because he's so stuck in his ways. :-)
You are also the guy who still thinks that VMS workstations are a
viable desktop computer... :-)
What's wrong with that? :-)
Post by Simon Clubley
I, OTOH, actively look at new ideas to see if they have any good parts
to them that I can use or if they are just a fad that will die off within
a couple of years...
Simon.
bill
HCorte
2021-10-01 16:10:29 UTC
Reply
Permalink
Post by Stephen Hoffman
One more question finished the command procedure, know whanted to pass
a variable/symbol to a program in fortran.
DCL commonly uses symbols, and logical names, and files. DECnet is also
easy, IP and SSL/TLS connections lack good support.
For Fortran, reading values from DCL symbols (lib$get_symbol),
translating values from logical names (lib$get_logical), reading the
data from the command input (works when in command procedures), reading
the input from a file (generic Fortran file I/O, or using RMS from
Fortran), reading the input from the DCL output directly, and reading
the input from a network link (DECnet, as DCL doesn't play well with
UDP, TCP, SSL/TLS), etc.
Same as usual for reading input with any other Fortran programs on OpenVMS.
Here, lib$get_symbol and lib$get_logical calls are probably the most
direct path, though I'd be tempted to use a file (possibly with
delete-on-close disposition), given you're seemingly working with a
list, and given the available Fortran sequential file I/O support.
Biggest issue with Fortran for some of these cases tends to be parsing
data, as Fortran doesn't handle variable-length data all that well.
The Fortran user's manual is probably a good starting point for
learning about your options and alternatives when using Fortran on
https://vmssoftware.com/docs/VSI_FORTRAN_USER.pdf
As it can be inferred you're not completely comfortable with OpenVMS
https://vmssoftware.com/docs/VSI_USERS_MANUAL.pdf
https://vmssoftware.com/docs/VSI_PROGRAM_CONCEPTS_VOL_I.pdf
https://vmssoftware.com/docs/VSI_PROGRAM_CONCEPTS_VOL_II.pdf
And since I've filled this reply with RTL calls, and this in
https://vmssoftware.com/docs/VSI_RTL_LIB$_MANUAL.pdf
Posted the question in "comp.lang.fortran" but forgoted to specify in
the initial inquiry/question that was using OpenVMS.
One suggestion was to use "EXECUTE_COMMAND_LINE" that from what could
tell its specific to Unix, and also "popen" from what could get also
Unix specific is there a equivalent for OpenVMS?
If you're invoking the procedure directly—and I'm still not entirely
clear about what this whole thread is trying to achieve—then calling
lib$spawn is one possibility, though there are others.
$ FORTRAN /VERSION
HP Fortran V8.2-104939-50H96
$ SHOW SYSTEM
OpenVMS V8.4
That's all past a dozen years old, and the HP/HPE OpenVMS versions are
no longer receiving patches.
V8.4-2L1 (Alpha EV56 and older), V8.4-2L2, (Alpha EV6 and EV7), and
V8.4-2L3 (Itanium) are current, as is VSI Fortran V8.3-3.
--
Pure Personal Opinion | HoffmanLabs LLC
Thanks for the links to the documentation Stephen, reading the "Run-Time Library LIB$ Routines" for the lib$spawn and status that can return SS$_NORMAL,SS$_ACCVIO,SS$_DUPLNAM ,fac$_xxx,LIB$_INVARG ,LIB$_INVSTRDES,LIB$_NOCLI

with INCLUDE '($SSDEF)' know that the values of
SS$_NORMAL: 1
SS$_ACCVIO: 12
SS$_DUPLNAM: 148

but can't find what is the library to include for remaining constants LIB$_INVARG ,LIB$_INVSTRDES,LIB$_NOCLI and fac$_xxx

getting the following value retuned by the SPAWN routine: 231666

know that its not LIB$_INVARG and LIB$_INVSTRDES since was able to run in simple program (lib$spawn) where the params are the same, so most likely is LIB$_NOCLI or fac$_xxx.

could someone help in what is the name of library for the constants Status return by the routine and 231666 means what? perhaps its fac$_xxx "Other error trying to create subprocess." if so a bit vague in the probleam...
abrsvc
2021-10-01 16:37:07 UTC
Reply
Permalink
Post by HCorte
Post by Stephen Hoffman
One more question finished the command procedure, know whanted to pass
a variable/symbol to a program in fortran.
DCL commonly uses symbols, and logical names, and files. DECnet is also
easy, IP and SSL/TLS connections lack good support.
For Fortran, reading values from DCL symbols (lib$get_symbol),
translating values from logical names (lib$get_logical), reading the
data from the command input (works when in command procedures), reading
the input from a file (generic Fortran file I/O, or using RMS from
Fortran), reading the input from the DCL output directly, and reading
the input from a network link (DECnet, as DCL doesn't play well with
UDP, TCP, SSL/TLS), etc.
Same as usual for reading input with any other Fortran programs on OpenVMS.
Here, lib$get_symbol and lib$get_logical calls are probably the most
direct path, though I'd be tempted to use a file (possibly with
delete-on-close disposition), given you're seemingly working with a
list, and given the available Fortran sequential file I/O support.
Biggest issue with Fortran for some of these cases tends to be parsing
data, as Fortran doesn't handle variable-length data all that well.
The Fortran user's manual is probably a good starting point for
learning about your options and alternatives when using Fortran on
https://vmssoftware.com/docs/VSI_FORTRAN_USER.pdf
As it can be inferred you're not completely comfortable with OpenVMS
https://vmssoftware.com/docs/VSI_USERS_MANUAL.pdf
https://vmssoftware.com/docs/VSI_PROGRAM_CONCEPTS_VOL_I.pdf
https://vmssoftware.com/docs/VSI_PROGRAM_CONCEPTS_VOL_II.pdf
And since I've filled this reply with RTL calls, and this in
https://vmssoftware.com/docs/VSI_RTL_LIB$_MANUAL.pdf
Posted the question in "comp.lang.fortran" but forgoted to specify in
the initial inquiry/question that was using OpenVMS.
One suggestion was to use "EXECUTE_COMMAND_LINE" that from what could
tell its specific to Unix, and also "popen" from what could get also
Unix specific is there a equivalent for OpenVMS?
If you're invoking the procedure directly—and I'm still not entirely
clear about what this whole thread is trying to achieve—then calling
lib$spawn is one possibility, though there are others.
$ FORTRAN /VERSION
HP Fortran V8.2-104939-50H96
$ SHOW SYSTEM
OpenVMS V8.4
That's all past a dozen years old, and the HP/HPE OpenVMS versions are
no longer receiving patches.
V8.4-2L1 (Alpha EV56 and older), V8.4-2L2, (Alpha EV6 and EV7), and
V8.4-2L3 (Itanium) are current, as is VSI Fortran V8.3-3.
--
Pure Personal Opinion | HoffmanLabs LLC
Thanks for the links to the documentation Stephen, reading the "Run-Time Library LIB$ Routines" for the lib$spawn and status that can return SS$_NORMAL,SS$_ACCVIO,SS$_DUPLNAM ,fac$_xxx,LIB$_INVARG ,LIB$_INVSTRDES,LIB$_NOCLI
with INCLUDE '($SSDEF)' know that the values of
SS$_NORMAL: 1
SS$_ACCVIO: 12
SS$_DUPLNAM: 148
but can't find what is the library to include for remaining constants LIB$_INVARG ,LIB$_INVSTRDES,LIB$_NOCLI and fac$_xxx
getting the following value retuned by the SPAWN routine: 231666
know that its not LIB$_INVARG and LIB$_INVSTRDES since was able to run in simple program (lib$spawn) where the params are the same, so most likely is LIB$_NOCLI or fac$_xxx.
could someone help in what is the name of library for the constants Status return by the routine and 231666 means what? perhaps its fac$_xxx "Other error trying to create subprocess." if so a bit vague in the probleam...
When I get a return value with no text, I usually do the following:

$ exit 231666
%DCL-E-TRMMBX, terminal has associated mailbox - terminate image and then SPAWN

Dan
Simon Clubley
2021-10-01 17:26:04 UTC
Reply
Permalink
Post by abrsvc
$ exit 231666
%DCL-E-TRMMBX, terminal has associated mailbox - terminate image and then SPAWN
And if the OP (or anyone else who tries the same thing with a different
error) then issues a $ HELP/MESSAGE _immediately_ after the above,
they will see a bit more detail about the error message.

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
Arne Vajhøj
2021-10-01 16:42:18 UTC
Reply
Permalink
Post by HCorte
Thanks for the links to the documentation Stephen, reading the "Run-Time Library LIB$ Routines" for the lib$spawn and status that can return SS$_NORMAL,SS$_ACCVIO,SS$_DUPLNAM ,fac$_xxx,LIB$_INVARG ,LIB$_INVSTRDES,LIB$_NOCLI
with INCLUDE '($SSDEF)' know that the values of
SS$_NORMAL: 1
SS$_ACCVIO: 12
SS$_DUPLNAM: 148
but can't find what is the library to include for remaining constants LIB$_INVARG ,LIB$_INVSTRDES,LIB$_NOCLI and fac$_xxx
$ libr/text/list sys$library:forsysdef
Directory of TEXT library SYS$COMMON:[SYSLIB]FORSYSDEF.TLB;1 on
1-OCT-2021 12:27:23
Creation date: 30-OCT-2012 23:43:04 Creator: Librarian A09-23
Revision date: 30-OCT-2012 23:43:04 Library format: 3.0
Number of modules: 319 Max. key length: 39
Other entries: 0 Preallocated index blocks: 32
Recoverable deleted blocks: 0 Total index blocks used: 15
Max. Number history records: 0 Library history records: 0

...
$LIBCLIDEF
$LIBDCFDEF
$LIBDEF
$LIBDTDEF
$LIBFILDEF
$LIBFISDEF
$LIBICB
$LIBVMDEF
$LIBWAITDEF
...
LIB$ROUTINES
...
$ libr/text/extr=$libdef/out=sys$output sys$library:forsysdef
!*** MODULE $LIBDEF ***
!DEC$ OPTIONS/ALIGN=(RECORDS=PACKED,COMMONS=PACKED)/NOWARN
!
! This SDL File Generated by VAX-11 Message V04-00 on 30-OCT-2012
08:41:42.41
!
! FILE: LIBMSG.MSG
...
PARAMETER LIB$_INVSTRDES = '00158224'X
! ; LIB$SCOPY_XXXX
PARAMETER LIB$_INTLOGERR = '0015822C'X
PARAMETER LIB$_INVARG = '00158234'X
! ; LIB$LOOKUP_KEY
...
Post by HCorte
getting the following value retuned by the SPAWN routine: 231666
know that its not LIB$_INVARG and LIB$_INVSTRDES since was able to
run in simple program (lib$spawn) where the params are the same, so most
likely is LIB$_NOCLI or fac$_xxx.
Post by HCorte
could someone help in what is the name of library for the constants
Status return by the routine and 231666 means what? perhaps its fac$_xxx
"Other error trying to create subprocess." if so a bit vague in the
probleam...

$ write sys$output f$message(231666)
%CLI-E-TRMMBX, terminal has associated mailbox - terminate image and
then SPAWN

Arne
V***@SendSpamHere.ORG
2021-10-01 20:48:59 UTC
Reply
Permalink
A quinta-feira, 2 de setembro de 2021 =C3=A0(s) 17:01:43 UTC+1, Stephen Hof=
On 2021-09-02 13:33:29 +0000, HCorte said:=20
=20
One more question finished the command procedure, know whanted to pass=
=20
a variable/symbol to a program in fortran.
DCL commonly uses symbols, and logical names, and files. DECnet is also=
=20
easy, IP and SSL/TLS connections lack good support.=20
=20
For Fortran, reading values from DCL symbols (lib$get_symbol),=20
translating values from logical names (lib$get_logical), reading the=20
data from the command input (works when in command procedures), reading=
=20
the input from a file (generic Fortran file I/O, or using RMS from=20
Fortran), reading the input from the DCL output directly, and reading=20
the input from a network link (DECnet, as DCL doesn't play well with=20
UDP, TCP, SSL/TLS), etc.=20
=20
Same as usual for reading input with any other Fortran programs on OpenVM=
S.=20
=20
Here, lib$get_symbol and lib$get_logical calls are probably the most=20
direct path, though I'd be tempted to use a file (possibly with=20
delete-on-close disposition), given you're seemingly working with a=20
list, and given the available Fortran sequential file I/O support.=20
=20
Biggest issue with Fortran for some of these cases tends to be parsing=20
data, as Fortran doesn't handle variable-length data all that well.=20
=20
The Fortran user's manual is probably a good starting point for=20
learning about your options and alternatives when using Fortran on=20
OpenVMS:=20
https://vmssoftware.com/docs/VSI_FORTRAN_USER.pdf=20
=20
As it can be inferred you're not completely comfortable with OpenVMS=20
and particularly with OpenVMS programming, some other documentation:=20
https://vmssoftware.com/docs/VSI_USERS_MANUAL.pdf=20
https://vmssoftware.com/docs/VSI_PROGRAM_CONCEPTS_VOL_I.pdf=20
https://vmssoftware.com/docs/VSI_PROGRAM_CONCEPTS_VOL_II.pdf=20
=20
And since I've filled this reply with RTL calls, and this in=20
conjunction with the Fortran user's manual (above):=20
https://vmssoftware.com/docs/VSI_RTL_LIB$_MANUAL.pdf
Posted the question in "comp.lang.fortran" but forgoted to specify in=
=20
the initial inquiry/question that was using OpenVMS.=20
=20
One suggestion was to use "EXECUTE_COMMAND_LINE" that from what could=
=20
tell its specific to Unix, and also "popen" from what could get also=20
Unix specific is there a equivalent for OpenVMS?
If you're invoking the procedure directly=E2=80=94and I'm still not entir=
ely=20
clear about what this whole thread is trying to achieve=E2=80=94then call=
ing=20
lib$spawn is one possibility, though there are others.
$ FORTRAN /VERSION=20
HP Fortran V8.2-104939-50H96=20
=20
$ SHOW SYSTEM=20
OpenVMS V8.4
That's all past a dozen years old, and the HP/HPE OpenVMS versions are=20
no longer receiving patches.=20
=20
V8.4-2L1 (Alpha EV56 and older), V8.4-2L2, (Alpha EV6 and EV7), and=20
V8.4-2L3 (Itanium) are current, as is VSI Fortran V8.3-3.=20
=20
=20
=20
--=20
Pure Personal Opinion | HoffmanLabs LLC
Thanks for the links to the documentation Stephen, reading the "Run-Time Li=
brary LIB$ Routines" for the lib$spawn and status that can return SS$_NORMA=
L,SS$_ACCVIO,SS$_DUPLNAM ,fac$_xxx,LIB$_INVARG ,LIB$_INVSTRDES,LIB$_NOCLI
with INCLUDE '($SSDEF)' know that the values of
SS$_NORMAL: 1
SS$_ACCVIO: 12
SS$_DUPLNAM: 148
but can't find what is the library to include for remaining constants LIB$_=
INVARG ,LIB$_INVSTRDES,LIB$_NOCLI and fac$_xxx
getting the following value retuned by the SPAWN routine: 231666
Try: $ EXIT 231666
know that its not LIB$_INVARG and LIB$_INVSTRDES since was able to run in s=
imple program (lib$spawn) where the params are the same, so most likely is =
LIB$_NOCLI or fac$_xxx.
could someone help in what is the name of library for the constants Status =
return by the routine and 231666 means what? perhaps its fac$_xxx "Other er=
ror trying to create subprocess." if so a bit vague in the probleam...
$ LIBRARY/MACRO/OUTPUT=SYS$OUTPUT SYS$LIBRARY:STARLET /EXTRACT=$LIBDEF

If you are trying to SPAWN and send output to a symbol, it won't work once
the subprocess terminates. That symbol is sdefined in the context of the
spawned process and DCL symbols are *unique* to a process.
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.
Lawrence D’Oliveiro
2021-10-03 22:43:23 UTC
Reply
Permalink
Post by V***@SendSpamHere.ORG
If you are trying to SPAWN and send output to a symbol, it won't work once
the subprocess terminates. That symbol is sdefined in the context of the
spawned process and DCL symbols are *unique* to a process.
As I recall, the lowest level of symbol definitions that you can share across processes is job-wide logical names.
Arne Vajhøj
2021-10-03 23:08:56 UTC
Reply
Permalink
Post by Lawrence D’Oliveiro
Post by V***@SendSpamHere.ORG
If you are trying to SPAWN and send output to a symbol, it won't work once
the subprocess terminates. That symbol is sdefined in the context of the
spawned process and DCL symbols are *unique* to a process.
As I recall, the lowest level of symbol definitions that you can share across processes is job-wide logical names.
Logicals are not symbols.

So job logicals are the lowest level of logical definitions shared
across processes.

Arne
HCorte
2021-10-07 11:18:37 UTC
Reply
Permalink
Thanks for that lexical function to obtain the error message, seems as stated the program is using mailbox so as documented can't use lib$spawn.
https://wiki.vmssoftware.com/SPAWN

As alternative in https://vmssoftware.com/docs/VSI_PROGRAM_CONCEPTS_VOL_I.pdf the use of sys$creprc but have a question that is this routine can run a command procedure instead of a image?

Tried

PROGRAM CRESUBPROC
IMPLICIT NONE

C INCLUDE '($SSDEF)'
C INCLUDE '(lib$routines)'
C INCLUDE '($stsdef)'
C INCLUDE '($IODEF)'
C INCLUDE '($SYSSRVNAM)'

INTEGER*4 STAT,pidadr,SYS$CREPRC,SYS$INPUT,SYS$OUTPUT

STAT = SYS$CREPRC(pidadr,'@script',
* SYS$INPUT,
* SYS$OUTPUT,
* SYS$OUTPUT,,,,,,,)
PRINT *,'PID Number:',pidadr
PRINT *,'Status',STAT

END

that returns 1 as sucess but the command procedure should add a job to lnm$job table that is not happenning
sh log /table=lnm$job.
Jan-Erik Söderholm
2021-10-07 11:56:01 UTC
Reply
Permalink
Post by HCorte
Thanks for that lexical function to obtain the error message, seems as stated the program is using mailbox so as documented can't use lib$spawn.
https://wiki.vmssoftware.com/SPAWN
As alternative in https://vmssoftware.com/docs/VSI_PROGRAM_CONCEPTS_VOL_I.pdf the use of sys$creprc but have a question that is this routine can run a command procedure instead of a image?
Tried
PROGRAM CRESUBPROC
IMPLICIT NONE
C INCLUDE '($SSDEF)'
C INCLUDE '(lib$routines)'
C INCLUDE '($stsdef)'
C INCLUDE '($IODEF)'
C INCLUDE '($SYSSRVNAM)'
INTEGER*4 STAT,pidadr,SYS$CREPRC,SYS$INPUT,SYS$OUTPUT
* SYS$INPUT,
* SYS$OUTPUT,
* SYS$OUTPUT,,,,,,,)
PRINT *,'PID Number:',pidadr
PRINT *,'Status',STAT
END
that returns 1 as sucess but the command procedure should add a job to lnm$job table that is not happenning
sh log /table=lnm$job.
I think that answer is to use SYS$SYSTEM:LOGINOUT.EXE as the image to run
and your COM file as the SYS$INPUT parameter.

Much like when you do:

$run/noaut -
/process_name=<proc name> -
/input=<your COM file> -
/out=<some LOG file> -
sys$system:loginout.exe
HCorte
2021-10-07 14:36:53 UTC
Reply
Permalink
Post by Jan-Erik Söderholm
Post by HCorte
Thanks for that lexical function to obtain the error message, seems as stated the program is using mailbox so as documented can't use lib$spawn.
https://wiki.vmssoftware.com/SPAWN
As alternative in https://vmssoftware.com/docs/VSI_PROGRAM_CONCEPTS_VOL_I.pdf the use of sys$creprc but have a question that is this routine can run a command procedure instead of a image?
Tried
PROGRAM CRESUBPROC
IMPLICIT NONE
C INCLUDE '($SSDEF)'
C INCLUDE '(lib$routines)'
C INCLUDE '($stsdef)'
C INCLUDE '($IODEF)'
C INCLUDE '($SYSSRVNAM)'
INTEGER*4 STAT,pidadr,SYS$CREPRC,SYS$INPUT,SYS$OUTPUT
* SYS$INPUT,
* SYS$OUTPUT,
* SYS$OUTPUT,,,,,,,)
PRINT *,'PID Number:',pidadr
PRINT *,'Status',STAT
END
that returns 1 as sucess but the command procedure should add a job to lnm$job table that is not happenning
sh log /table=lnm$job.
I think that answer is to use SYS$SYSTEM:LOGINOUT.EXE as the image to run
and your COM file as the SYS$INPUT parameter.
$run/noaut -
/process_name=<proc name> -
/input=<your COM file> -
/out=<some LOG file> -
sys$system:loginout.exe
Thanks Jan thats it, SYS$SYSTEM:LOGINOUT.EXE saw in the documentation but didn't cross my mind to put the script as input...
Lawrence D’Oliveiro
2021-10-08 00:46:44 UTC
Reply
Permalink
Post by Arne Vajhøj
Logicals are not symbols.
If names are not symbols, then what are they?
Arne Vajhøj
2021-10-08 01:09:03 UTC
Reply
Permalink
Post by Lawrence D’Oliveiro
Post by Arne Vajhøj
Logicals are not symbols.
If names are not symbols, then what are they?
Logical names are distinct from symbols.

They are stored differently (symbols are in DCL memory,
logicals are in logical tables).

They are used differently.

Logicals got a lot of features with mode and different
logical tables.

Arne
Craig A. Berry
2021-10-08 01:25:35 UTC
Reply
Permalink
Post by Lawrence D’Oliveiro
Post by Arne Vajhøj
Logicals are not symbols.
If names are not symbols, then what are they?
In the sense of a linguistic symbol, logical names are symbols. But in
the context of DCL, DCL symbols are a special kind of symbol,
essentially a DCL variable. Logical names are not really part of DCL,
though of course there are DCL verbs to get and set logical names.
"Symbols" in VMS parlance are actually part of DCL.
Stephen Hoffman
2021-10-08 15:39:15 UTC
Reply
Permalink
Post by Lawrence D’Oliveiro
If names are not symbols, then what are they?
Symbols are DCL variables, and are accessible within and local to DCL.

Logical names are I/O system variables, and are accessible to (most)
file system clients.
--
Pure Personal Opinion | HoffmanLabs LLC
Phillip Helbig (undress to reply)
2021-10-08 15:57:22 UTC
Reply
Permalink
Logical names are used all over for devices, directories and files.
But they are not limited to that.
They can be used for almost anything.
Including configuration settings. You may not like that usage, but it
happens.
Why not?

Nothing like a cluster-wide logical name (perhaps limited to a group,
i.e. new table with the cluster table as the parent) to configure
things, changeable on the fly, across a cluster.
Stephen Hoffman
2021-10-08 16:38:27 UTC
Reply
Permalink
Post by Phillip Helbig (undress to reply)
Nothing like a cluster-wide logical name (perhaps limited to a group,
i.e. new table with the cluster table as the parent) to configure
things, changeable on the fly, across a cluster.
If by "nothing like" you mean to omit vastly more capable LDAP, sure.
Not that OpenVMS has deigned to integrate LDAP into most apps, or any
other form of app configuration management API or tools.

As for the use of logical names in managing apps, the sheer unmitigated
joy of having some logical name silently and out-of-band defined
somewhere else utterly derailing production processing in some weird
way is something I will always treasure, of course.
--
Pure Personal Opinion | HoffmanLabs LLC
Simon Clubley
2021-10-08 18:07:15 UTC
Reply
Permalink
Post by Stephen Hoffman
As for the use of logical names in managing apps, the sheer unmitigated
joy of having some logical name silently and out-of-band defined
somewhere else utterly derailing production processing in some weird
way is something I will always treasure, of course.
Perhaps what we need is a schema for logical name tables so that
only expected logical names can appear in a table. :-)

On a more serious note, does anyone else wish you could attach a comment
to a logical name definition so that you could see in SHOW LOGICAL
what the purpose of a logical is ?

The comment could also include the valid values as well if the logical
is used for configuration.

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
Arne Vajhøj
2021-10-08 18:26:38 UTC
Reply
Permalink
Post by Simon Clubley
Post by Stephen Hoffman
As for the use of logical names in managing apps, the sheer unmitigated
joy of having some logical name silently and out-of-band defined
somewhere else utterly derailing production processing in some weird
way is something I will always treasure, of course.
Perhaps what we need is a schema for logical name tables so that
only expected logical names can appear in a table. :-)
On a more serious note, does anyone else wish you could attach a comment
to a logical name definition so that you could see in SHOW LOGICAL
what the purpose of a logical is ?
The comment could also include the valid values as well if the logical
is used for configuration.
That would be nice.

And it should not be that hard to implement. It will use more memory,
but memory is bought by the GB these days.

Arne
Dave Froble
2021-10-08 18:38:37 UTC
Reply
Permalink
Post by Simon Clubley
Post by Stephen Hoffman
As for the use of logical names in managing apps, the sheer unmitigated
joy of having some logical name silently and out-of-band defined
somewhere else utterly derailing production processing in some weird
way is something I will always treasure, of course.
Perhaps what we need is a schema for logical name tables so that
only expected logical names can appear in a table. :-)
On a more serious note, does anyone else wish you could attach a comment
to a logical name definition so that you could see in SHOW LOGICAL
what the purpose of a logical is ?
The comment could also include the valid values as well if the logical
is used for configuration.
Simon.
To first address Philip's comment, anyone with sufficient privs can
define a logical name. There is no other controls.

So then I ask, just why do we design and write programs with specific
controls on what can be done?

Say an Accounts Receivable system has an application for applying
payments. That would include updating cash, decreasing what is owed,
and such. There is a specific design to be followed, and enforced.
Someone getting a check and throwing it into cash without decreasing the
receivable would be chaos. Using a logical name for the cash G/L
account might occur to someone, but, lends itself well to corruption and
theft.

So while a logical name for defining where the A/R files are located
might be reasonable, not following the design of the system is not
reasonable.

Logical names can be used to good purpose, or, they can be used for
chaos. Your choice.

Many tools can be used for both appropriate and inappropriate jobs.
Hammers for screws might work, but not well. Screwdrivers for nails
doesn't work too well, if at all.

As for logical names, Simon has a point. More so for inappropriate use.
Not so much for appropriate usage.

I do like Steve's example. The possibilities, and chaos, are endless.

:-)
--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: ***@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486
Phillip Helbig (undress to reply)
2021-10-08 19:57:15 UTC
Reply
Permalink
Post by Dave Froble
To first address Philip's comment, anyone with sufficient privs can
define a logical name. There is no other controls.
Put sensitive names in a special table, use that table, put appropriate
protection on that table.
Dave Froble
2021-10-09 01:14:38 UTC
Reply
Permalink
Post by Phillip Helbig (undress to reply)
Post by Dave Froble
To first address Philip's comment, anyone with sufficient privs can
define a logical name. There is no other controls.
Put sensitive names in a special table, use that table, put appropriate
protection on that table.
No, just don't use logicals in a really, really, stupid manner!
--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: ***@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486
V***@SendSpamHere.ORG
2021-10-08 19:02:58 UTC
Reply
Permalink
Post by Simon Clubley
Post by Stephen Hoffman
As for the use of logical names in managing apps, the sheer unmitigated
joy of having some logical name silently and out-of-band defined
somewhere else utterly derailing production processing in some weird
way is something I will always treasure, of course.
Perhaps what we need is a schema for logical name tables so that
only expected logical names can appear in a table. :-)
On a more serious note, does anyone else wish you could attach a comment
to a logical name definition so that you could see in SHOW LOGICAL
what the purpose of a logical is ?
The comment could also include the valid values as well if the logical
is used for configuration.
Good grief.
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.
Dave Froble
2021-10-08 19:36:42 UTC
Reply
Permalink
Post by V***@SendSpamHere.ORG
Post by Simon Clubley
Post by Stephen Hoffman
As for the use of logical names in managing apps, the sheer unmitigated
joy of having some logical name silently and out-of-band defined
somewhere else utterly derailing production processing in some weird
way is something I will always treasure, of course.
Perhaps what we need is a schema for logical name tables so that
only expected logical names can appear in a table. :-)
On a more serious note, does anyone else wish you could attach a comment
to a logical name definition so that you could see in SHOW LOGICAL
what the purpose of a logical is ?
The comment could also include the valid values as well if the logical
is used for configuration.
Good grief.
An apt response.

One does not, if one is competent, hardcode data into a program.
External tables are much more appropriate for that.
--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: ***@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486
Simon Clubley
2021-10-08 20:47:53 UTC
Reply
Permalink
Post by Dave Froble
Post by V***@SendSpamHere.ORG
Post by Simon Clubley
Post by Stephen Hoffman
As for the use of logical names in managing apps, the sheer unmitigated
joy of having some logical name silently and out-of-band defined
somewhere else utterly derailing production processing in some weird
way is something I will always treasure, of course.
Perhaps what we need is a schema for logical name tables so that
only expected logical names can appear in a table. :-)
On a more serious note, does anyone else wish you could attach a comment
to a logical name definition so that you could see in SHOW LOGICAL
what the purpose of a logical is ?
The comment could also include the valid values as well if the logical
is used for configuration.
Good grief.
I see you like my suggestion about as well as normal Brian. :-)
Post by Dave Froble
An apt response.
One does not, if one is competent, hardcode data into a program.
External tables are much more appropriate for that.
You are not hardcoding data. You are adding a comment about what
the logical name does, including any valid values it can contain
if you are using it as a configuration variable.

Do you document the fields in the definition for an ISAM table ?

Do you document the fields within the definition of a SQL table ?

Do you document the fields for the tables in your own database ?

Do you document the variables within your programs ?

Do you document the variables within your command procedures ?

Logical names are variables in the same way as all of the above and
it would be nice to be able to document them at source in the same
way as you can all of the above (hopefully including your own
database).

BTW, definitions within application programs are only one way in
which logicals can be defined.

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
V***@SendSpamHere.ORG
2021-10-09 00:47:56 UTC
Reply
Permalink
Post by Simon Clubley
Post by Dave Froble
Post by V***@SendSpamHere.ORG
Post by Simon Clubley
Post by Stephen Hoffman
As for the use of logical names in managing apps, the sheer unmitigated
joy of having some logical name silently and out-of-band defined
somewhere else utterly derailing production processing in some weird
way is something I will always treasure, of course.
Perhaps what we need is a schema for logical name tables so that
only expected logical names can appear in a table. :-)
On a more serious note, does anyone else wish you could attach a comment
to a logical name definition so that you could see in SHOW LOGICAL
what the purpose of a logical is ?
The comment could also include the valid values as well if the logical
is used for configuration.
Good grief.
I see you like my suggestion about as well as normal Brian. :-)
Post by Dave Froble
An apt response.
One does not, if one is competent, hardcode data into a program.
External tables are much more appropriate for that.
You are not hardcoding data. You are adding a comment about what
the logical name does, including any valid values it can contain
if you are using it as a configuration variable.
Do you document the fields in the definition for an ISAM table ?
Do you document the fields within the definition of a SQL table ?
Do you document the fields for the tables in your own database ?
Do you document the variables within your programs ?
Do you document the variables within your command procedures ?
Logical names are variables in the same way as all of the above and
it would be nice to be able to document them at source in the same
way as you can all of the above (hopefully including your own
database).
BTW, definitions within application programs are only one way in
which logicals can be defined.
When I see it in your precious un*x, then I might sconsider your SIR.
Environment variable with all sorts of uncouth cryptic translations
begs for your request more than any VMS logical.
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.
Lawrence D’Oliveiro
2021-10-08 23:06:27 UTC
Reply
Permalink
Post by Simon Clubley
On a more serious note, does anyone else wish you could attach a comment
to a logical name definition so that you could see in SHOW LOGICAL
what the purpose of a logical is ?
What do you know, Unix-style text configuration files usually allow for ample comments. And they can be managed with common text editors and other regular file-manipulation tools, including comparing changes with diff(1).
Jan-Erik Söderholm
2021-10-09 08:31:47 UTC
Reply
Permalink
Post by Lawrence D’Oliveiro
Post by Simon Clubley
On a more serious note, does anyone else wish you could attach a comment
to a logical name definition so that you could see in SHOW LOGICAL
what the purpose of a logical is ?
No, better to keep the comments/documentation for each logical name
in the command file where the logical is created.
Post by Lawrence D’Oliveiro
What do you know, Unix-style text configuration files usually allow for ample comments.
A "configuration file" is just a file where you setup your configuration.

Doesn't matter if that file is read directly by the application or if the
file is run at application startup and defining a bunch of logical names
that are then used by the application.

It is still just a "configuration file". And it can have as many
comments/documentation as you like.
Post by Lawrence D’Oliveiro
And they can be managed with common text editors and other regular
file-manipulation tools, including comparing changes with diff(1).
You could just as well describe VMS here also, of course. No difference.
Dave Froble
2021-10-09 22:47:03 UTC
Reply
Permalink
Post by Jan-Erik Söderholm
Post by Lawrence D’Oliveiro
Post by Simon Clubley
On a more serious note, does anyone else wish you could attach a comment
to a logical name definition so that you could see in SHOW LOGICAL
what the purpose of a logical is ?
No, better to keep the comments/documentation for each logical name
in the command file where the logical is created.
Agree 110%
If one knows what COM file defined the logical.
But that is not always obvious.
It had better be, or you've already got a real mess.
Post by Jan-Erik Söderholm
Post by Lawrence D’Oliveiro
What do you know, Unix-style text configuration files usually allow for ample comments.
A "configuration file" is just a file where you setup your configuration.
Doesn't matter if that file is read directly by the application or if the
file is run at application startup and defining a bunch of logical names
that are then used by the application.
It is still just a "configuration file". And it can have as many
comments/documentation as you like.
If the logical strictly relates to a specific application, then
locating the startup file is not a problem.
It is the other ones that can be tricky.
Should there be any other ones ????

There is system configuration, which must support the required
application environment.

There is application environment.

A serious demark should exist between them.

My stomach acid is still active after that remark about storing
application configuration data in SYSGEN parameters.

:-(
--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: ***@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486
Arne Vajhøj
2021-10-09 23:10:43 UTC
Reply
Permalink
Post by Dave Froble
Post by Jan-Erik Söderholm
No, better to keep the comments/documentation for each logical name
in the command file where the logical is created.
Agree 110%
If one knows what COM file defined the logical.
But that is not always obvious.
It had better be, or you've already got a real mess.
If the logical strictly relates to a specific application, then
locating the startup file is not a problem.
It is the other ones that can be tricky.
Should there be any other ones ????
There is system configuration, which must support the required
application environment.
There is application environment.
A serious demark should exist between them.
Let us be more specific by taking an example.

decc$efs_charset

where would you look for the definition of that?

Arne
Dave Froble
2021-10-10 01:22:31 UTC
Reply
Permalink
Post by Arne Vajhøj
Post by Dave Froble
Post by Jan-Erik Söderholm
No, better to keep the comments/documentation for each logical name
in the command file where the logical is created.
Agree 110%
If one knows what COM file defined the logical.
But that is not always obvious.
It had better be, or you've already got a real mess.
If the logical strictly relates to a specific application, then
locating the startup file is not a problem.
It is the other ones that can be tricky.
Should there be any other ones ????
There is system configuration, which must support the required
application environment.
There is application environment.
A serious demark should exist between them.
Let us be more specific by taking an example.
decc$efs_charset
where would you look for the definition of that?
Arne
Since I don't know what it is, I have no idea.

Now if it is one of those logicals that define how C operates, that
Steve is so fond of, I would not look for it anywhere, I'd get rid of it.
--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: ***@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486
Lawrence D’Oliveiro
2021-10-10 02:16:01 UTC
Reply
Permalink
Post by Dave Froble
Now if it is one of those logicals that define how C operates, that
Steve is so fond of, I would not look for it anywhere, I'd get rid of it.
Do you think the whole concept of logical names has passed its translate-by date?
Dave Froble
2021-10-10 03:46:36 UTC
Reply
Permalink
Post by Lawrence D’Oliveiro
Post by Dave Froble
Now if it is one of those logicals that define how C operates, that
Steve is so fond of, I would not look for it anywhere, I'd get rid of it.
Do you think the whole concept of logical names has passed its translate-by date?
Not at all, if used in a manner I'd consider proper.
--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: ***@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486
Arne Vajhøj
2021-10-10 12:51:24 UTC
Reply
Permalink
Post by Lawrence D’Oliveiro
Post by Dave Froble
Now if it is one of those logicals that define how C operates, that
Steve is so fond of, I would not look for it anywhere, I'd get rid of it.
Do you think the whole concept of logical names has passed its translate-by date?
Logicals make good sense for devices, directories and files.

Arne

Arne Vajhøj
2021-10-10 12:49:47 UTC
Reply
Permalink
Post by Dave Froble
Post by Arne Vajhøj
Let us be more specific by taking an example.
decc$efs_charset
where would you look for the definition of that?
Since I don't know what it is, I have no idea.
With DECC$EFS_CHARSET enabled, UNIX names can contain ODS-5
extended characters. Support includes multiple dots and all ASCII
characters in the range 0 to 255, except the following:

<NUL>
/ *
" ?

Unless DECC$FILENAME_UNIX_ONLY is enabled, some characters can be
interpreted as OpenVMS characters depending on context. They are:

: ^
[ ;
<
Post by Dave Froble
Now if it is one of those logicals that define how C operates, that
Steve is so fond of,
It is. :-)
Post by Dave Froble
I would not look for it anywhere, I'd get rid of it.
Not my code that requires it. Somebody elses code that I am just using.

Arne
Jan-Erik Söderholm
2021-10-10 08:44:24 UTC
Reply
Permalink
Post by Arne Vajhøj
Let us be more specific by taking an example.
decc$efs_charset
where would you look for the definition of that?
Arne
I do not need to, since it isn't even defined.
If it *had* been defined, I would be able to find where.
Tad Winters
2021-10-09 23:04:00 UTC
Reply
Permalink
<<snip>>

This whole topic has left me with thoughts of how to design a method of
preserving current logical name translations for system and group name
tables across system reboots, including considering the idea of
restricting the possible translations and providing a comment which
designates the use of the logical.

Dang it. I have other things I need to think about. :-)
Stephen Hoffman
2021-10-10 00:03:12 UTC
Reply
Permalink
Post by Tad Winters
<<snip>>
This whole topic has left me with thoughts of how to design a method of
preserving current logical name translations for system and group name
tables across system reboots, including considering the idea of
restricting the possible translations and providing a comment which
designates the use of the logical.
Dang it. I have other things I need to think about. :-)
Congratulations, you're now considering building an app- or
user-preferences API.

Logical names are a very limited means of manifesting those settings
into the apps too, as your character-encoding is limited. Having an API
to access preferences also gives you options that don't exist with the
logical name APIs such as wildcards. (Well, other than invoking SHOW
LOGICAL and parsing the results of course, and which is unsupported.)
And with logical names as the manifestation, you can be building a
parser in the apps for what should be considered untrusted data.

Existing examples of preferences files include X and its preferences
file processing, various app-specific examples present within OpenVMS,
and examples from other platforms.
https://developer.apple.com/documentation/foundation/preferences/

Persistent storage of the settings can be file-based, or in LDAP. For
file-based persistence, you'll probably then be looking at JSON, YAML,
maybe Protocol Buffers, maybe (probably not) XML, etc.
https://developers.google.com/protocol-buffers/docs/overview Or you can
stuff it all into app-maintained fields within a punched card structure
in an RMS file, of course.

LDAP is what cluster-wide and network-wide logical names, SYSUAF,
user-specific account details, user mailbox information, and many other
details will all be based on, should VSI decide to refactor the current
designs to address the existing limitations. Alas, OpenVMS integration
with LDAP past the rather limited external authentication
implementation is presently lacking.

I'll leave discussions of the Windows registry for another day, though
that too is already an option on OpenVMS.

Many Unix systems use dot files for settings, and you will find some of
this usage on OpenVMS.
--
Pure Personal Opinion | HoffmanLabs LLC
Arne Vajhøj
2021-10-10 00:19:47 UTC
Reply
Permalink
Post by Stephen Hoffman
Logical names are a very limited means of manifesting those settings
into the apps too, as your character-encoding is limited. Having an API
to access preferences also gives you options that don't exist with the
logical name APIs such as wildcards. (Well, other than invoking SHOW
LOGICAL and parsing the results of course, and which is unsupported.)
And with logical names as the manifestation, you can be building a
parser in the apps for what should be considered untrusted data.
Existing examples of preferences files include X and its preferences
file processing, various app-specific examples present within OpenVMS,
and examples from other platforms.
https://developer.apple.com/documentation/foundation/preferences/
Persistent storage of the settings can be file-based, or in LDAP. For
file-based persistence, you'll probably then be looking at JSON, YAML,
maybe Protocol Buffers, maybe (probably not) XML, etc.
https://developers.google.com/protocol-buffers/docs/overview Or you can
stuff it all into app-maintained fields within a punched card structure
in an RMS file, of course.
protobuf is a binary format so not likely.

XML is still widely used for this: .NET app config,
Java preferences etc..

Arne
Lawrence D’Oliveiro
2021-10-10 00:29:12 UTC
Reply
Permalink
Post by Tad Winters
This whole topic has left me with thoughts of how to design a method of
preserving current logical name translations for system and group name
tables across system reboots, including considering the idea of
restricting the possible translations and providing a comment which
designates the use of the logical.
To save effort, you could model it on this: <https://manpages.debian.org/bullseye/procps/sysctl.conf.5.en.html>.
Stephen Hoffman
2021-10-08 16:29:48 UTC
Reply
Permalink
Post by Stephen Hoffman
Post by Lawrence D’Oliveiro
If names are not symbols, then what are they?
Symbols are DCL variables, and are accessible within and local to DCL.
Logical names are I/O system variables, and are accessible to (most)
file system clients.
Logical names are used all over for devices, directories and files.
But they are not limited to that.
They can be used for almost anything.
Including configuration settings. You may not like that usage, but it happens.
Those would all be among the file system clients mentioned, yes.

Less visible to inexperienced OpenVMS users, OpenVMS system parameters
are even lower-level variables, though those with pre-defined names. A
few of those system parameters are reserved for users.

Biggest confusion with symbols and logical names is that DCL can
translate symbols and logical names as both DCL and the I/O system are
visible within that context, but apps can only translate symbols when
DCL is available within the current context.

Underpinning one of my grumbles about logical name usage and symbol
usage is that OpenVMS lacks a common means and API for app
configuration storage, which leads to other issues not the least of
which are explosions of poorly-suited mechanisms including the use of
DCL symbols and logical names and system parameters, and several dozen
places where the "host name" resides. The volatile and
printable-MCS-only logical name key-value store is also not a great fit
for configuration data, discussions of its widespread (mis)use for that
purpose aside. And yes, y'all can put app configuration settings down
in the system parameters, too.
--
Pure Personal Opinion | HoffmanLabs LLC
Arne Vajhøj
2021-10-08 16:58:05 UTC
Reply
Permalink
Post by Stephen Hoffman
Post by Stephen Hoffman
Post by Lawrence D’Oliveiro
If names are not symbols, then what are they?
Symbols are DCL variables, and are accessible within and local to DCL.
Logical names are I/O system variables, and are accessible to (most)
file system clients.
Logical names are used all over for devices, directories and files.
But they are not limited to that.
They can be used for almost anything.
Including configuration settings. You may not like that usage, but it happens.
Those would all be among the file system clients mentioned, yes.
I am still not sure why you say "file system clients".

Let me create a super simple example:

$ typ hoff.com
$ v = f$integer(f$logical("v"))
$ v = v + 1
$ write sys$output "Ran ''v' times"
$ define/job/nolog v 'v'
$ exit
$ @hoff
Ran 1 times
$ @hoff
Ran 2 times
$ spawn
%DCL-S-SPAWNED, process ARNE_11162 spawned
%DCL-S-ATTACHED, terminal now attached to process ARNE_11162
$ @hoff
Ran 3 times
$ eoj
Process ARNE_11162 logged out at 8-OCT-2021 12:52:15.61
%DCL-S-RETURNED, control returned to process ARNE
$ @hoff
Ran 4 times

Is hoff.com a file system client?

Arne
Lawrence D’Oliveiro
2021-10-08 23:04:34 UTC
Reply
Permalink
Post by Stephen Hoffman
Underpinning one of my grumbles about logical name usage and symbol
usage is that OpenVMS lacks a common means and API for app
configuration storage, which leads to other issues not the least of
which are explosions of poorly-suited mechanisms including the use of
DCL symbols and logical names and system parameters, and several dozen
places where the "host name" resides. The volatile and
printable-MCS-only logical name key-value store is also not a great fit
for configuration data, discussions of its widespread (mis)use for that
purpose aside. And yes, y'all can put app configuration settings down
in the system parameters, too.
You are not suggesting that VMS adopt a Windows-style Registry, are you? Now there is a total, wonderful fustercluck: it’s supposed to be a multiuser database, allowing concurrent access and notification of changes made by one client to others. Yet none of that works. Which is why you need to reboot after making Registry changes. Do you really want to have to reboot your VMS system after every app configuration change?

Stick with Unix-style text configuration files, kept in a common directory like /etc. With symbolic names for parameters, rather than long, random hex GUIDs!
Arne Vajhøj
2021-10-08 23:44:11 UTC
Reply
Permalink
Post by Lawrence D’Oliveiro
Post by Stephen Hoffman
Underpinning one of my grumbles about logical name usage and
symbol usage is that OpenVMS lacks a common means and API for app
configuration storage, which leads to other issues not the least
of which are explosions of poorly-suited mechanisms including the
use of DCL symbols and logical names and system parameters, and
several dozen places where the "host name" resides. The volatile
and printable-MCS-only logical name key-value store is also not a
great fit for configuration data, discussions of its widespread
(mis)use for that purpose aside. And yes, y'all can put app
configuration settings down in the system parameters, too.
You are not suggesting that VMS adopt a Windows-style Registry, are
you?
Like:

$ SET SERVER REGISTRY_SERVER /START

:-)
Post by Lawrence D’Oliveiro
Now there is a total, wonderful fustercluck: it’s supposed to be
a multiuser database, allowing concurrent access and notification of
changes made by one client to others. Yet none of that works.
It works.
Post by Lawrence D’Oliveiro
Which
is why you need to reboot after making Registry changes.
You do not need to reboot.
Post by Lawrence D’Oliveiro
Stick with Unix-style text configuration files, kept in a common
directory like /etc. With symbolic names for parameters, rather than
long, random hex GUIDs!
There seems to be agreement on that among all the big
communities including Microsoft.

XML, JSON, YAML, properties, whatever.

Arne
Dave Froble
2021-10-09 01:13:33 UTC
Reply
Permalink
Post by Stephen Hoffman
And yes,
y'all can put app configuration settings down in the system parameters,
too.
That is just too, too, far out. A pox on anyone who might do so.

Hawk, spit, gag, gag, gag, gag ....
--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: ***@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486
Lawrence D’Oliveiro
2021-10-08 22:58:50 UTC
Reply
Permalink
Post by Lawrence D’Oliveiro
If names are not symbols, then what are they?
Symbols are DCL variables ...
Note I didn’t use the term “variable”. DCL also has functions, as I recall. And their names are symbols, too.
Logical names are I/O system variables, and are accessible to (most)
file system clients.
Just another kind of “symbol”. You know, as in “symbolic” of something. The kind that is commonly kept in a “symbol table” somewhere.
Arne Vajhøj
2021-10-08 23:32:53 UTC
Reply
Permalink
Post by Lawrence D’Oliveiro
Post by Stephen Hoffman
Logical names are I/O system variables, and are accessible to
(most) file system clients.
Just another kind of “symbol”. You know, as in “symbolic” of
something. The kind that is commonly kept in a “symbol table”
somewhere.
It the level where kept somewhere is sufficient then is is probably
fine to consider logicals to be kind of symbols.

But if one actually need to use the thing then it is very much
necessary to know whether it is a symbol or a logical.

Arne
Stephen Hoffman
2021-10-02 00:31:59 UTC
Reply
Permalink
Post by HCorte
Thanks for the links to the documentation Stephen, reading the
"Run-Time Library LIB$ Routines" for the lib$spawn and status that can
return SS$_NORMAL,SS$_ACCVIO,SS$_DUPLNAM ,fac$_xxx,LIB$_INVARG
,LIB$_INVSTRDES,LIB$_NOCLI
with INCLUDE '($SSDEF)' know that the values of
SS$_NORMAL: 1
SS$_ACCVIO: 12
SS$_DUPLNAM: 148
but can't find what is the library to include for remaining constants
LIB$_INVARG ,LIB$_INVSTRDES,LIB$_NOCLI and fac$_xxx
getting the following value retuned by the SPAWN routine: 231666
know that its not LIB$_INVARG and LIB$_INVSTRDES since was able to run
in simple program (lib$spawn) where the params are the same, so most
likely is LIB$_NOCLI or fac$_xxx.
could someone help in what is the name of library for the constants
Status return by the routine and 231666 means what? perhaps its
fac$_xxx "Other error trying to create subprocess." if so a bit vague
in the probleam...
LIBDEF, and HELP /MESSAGE, and the rest, as mentioned in previous
replies to this reply.

Best to use STSDEF to capture whole ranges of errors, and not try to
list all specific errors in the error-handling code, though.

Low bit set is success, clear is failure. Success is odd. Failure is
even. The condition values are further broken down into success,
informational, warning, error, and fatal ranges.

There are lots of potential errors.

And new errors can be added.

In the debugger, the command EXAMINE /CONDITION {variablename} helps
speed the whole development and debug process.

If you're not using the debugger here, well, it's an invaluable tool
for these and other development-related tasks.
--
Pure Personal Opinion | HoffmanLabs LLC
MG
2021-08-31 15:48:19 UTC
Reply
Permalink
Post by Jim
Maybe pass the value of the SEARCH output back to the parent process using a job logical name...
$ pipe/nosymbol/nological -
show process YYYYYY | -
search sys$pipe "Devices allocated:" | -
( read sys$pipe x ; define/job x &x )
$ device_aux = f$element(1,":",f$edit(f$trnlnm("x","lnm$job"),"collapse"))
$ deassign/job x
$ show symbol device_aux
Interesting workaround.

- MG
cao...@pitbulluk.org
2021-08-31 16:26:38 UTC
Reply
Permalink
Post by MG
Post by Jim
Maybe pass the value of the SEARCH output back to the parent process using a job logical name...
$ pipe/nosymbol/nological -
show process YYYYYY | -
search sys$pipe "Devices allocated:" | -
( read sys$pipe x ; define/job x &x )
$ device_aux = f$element(1,":",f$edit(f$trnlnm("x","lnm$job"),"collapse"))
$ deassign/job x
$ show symbol device_aux
Interesting workaround.
- MG
Chances are though, you will still only get a node$MPAx: device back because it'll be the first listed after 'Devices allocated:' thanks to the PIPE command
HCorte
2021-08-31 16:41:07 UTC
Reply
Permalink
Thanks @Jim works like a charm
Jim
2021-08-31 17:00:02 UTC
Reply
Permalink
Post by ***@pitbulluk.org
Post by MG
Post by Jim
Maybe pass the value of the SEARCH output back to the parent process using a job logical name...
$ pipe/nosymbol/nological -
show process YYYYYY | -
search sys$pipe "Devices allocated:" | -
( read sys$pipe x ; define/job x &x )
$ device_aux = f$element(1,":",f$edit(f$trnlnm("x","lnm$job"),"collapse"))
$ deassign/job x
$ show symbol device_aux
Interesting workaround.
- MG
Chances are though, you will still only get a node$MPAx: device back because it'll be the first listed after 'Devices allocated:' thanks to the PIPE command
True if process YYYYYY is the process executing the commands... but. presumably it is not as the OP would not likely have included the process name on the SHOW PROCESS command if target was self.
Hein RMS van den Heuvel
2021-09-05 00:57:18 UTC
Reply
Permalink
Post by HCorte
Implementing a command procedure that first obtains the device allocated to a process for example purposes called YYYYYY.
How to output the results of (SEARCH SYS$INPUT "Devices allocated") to the variable DEVICEAUX tried (READ SYS$PIPE DEVICEAUX) but with no success.
$ pipe SH PROCESS YYYYYY | SEARCH SYS$INPUT "Devices allocated" | (READ SYS$PIPE DEVICEAUX)
$ WRITE SYS$OUTPUT DEVICEAUX
$ DEVICE_AUX = F$EDIT(F$ELEMENT(1, ":", TEST),"TRIM")
$ WRITE SYS$OUTPUT DEVICE_AUX
can make it work to write to a file
$ pipe SH PROCESS SCMLCOMOLM | SEARCH SYS$PIPE "Devices allocated" > DEVICEAUX.DAT
but would prefer to avoid having to write and read from file if possible, also in command procedure should alls use SYS$PIPE instead of SYS$INPUT?
Eisner - HTTP$SERVER

$ perl -e "for (qx(show proc /id=00078E34)) { push @dev,$1 if / (\w+\d+):$/} print join q(,),@dev "
EWA133,BG25512,BG25513,BG25514, ....

or

$ perl -e "for (qx(show proc /id=00078E34)) { push @dev,$1 if / (\w+\d+):$/} $ENV{test} = join q(,),@dev "
$ show log test
"TEST" = "EWA133,BG25512,BG25513,BG25514, ... " (LNM$PROCESS_TABLE)

Narration:

-e = "execute following string as Perl program"

for ( ... ) { ... } = loop over output from whatever is delivered between parens into default variable $_ and execute block each time.
qx = execute in sub-process, delivering to output lines to for loop
block:
push array, element $1
IFF
there is a match ( /.../ ) in value of default variable $_
ON a space (paren to start remembering into $1) followed by some word chars and some numbers (stop remembering) and a colon at end-of-line.
end block
end loop
q(,) = single quoted string = non-interpolated string holding a comma ! Could have used qq(,) as wel for double quoted - no difference in this case.

set associative array ENV (which maps only Logicals and Symbols) element 'test' to become all devices names joined, separated with a comma between each.

Enjoy,
Hein
Loading...