[Info-vax] Command Procedure Pipe output to a variable
Jon Pinkley
jon.pinkley at gmail.com
Wed Sep 1 19:09:17 EDT 2021
On Tuesday, August 31, 2021 at 6:05:33 PM UTC-4, VAXman- wrote:
> 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.
More information about the Info-vax
mailing list