T.R | Title | User | Personal Name | Date | Lines |
---|
187.1 | Seperate Process... | XDELTA::HOFFMAN | Steve, OpenVMS Engineering | Wed Feb 12 1997 14:21 | 20 |
|
It's a seperate process -- symbols and logicals are (usually) copied
from parent process to the child process when the spawn is performed,
but are not copied (back) when the process logs out.
The mechanism used to copy the symbols and logicals into the new
subprocess is one of the reasons why the OpenVMS process creation can
take so long...
Also see EPS::COMMAND_PROCEDURES for DCL questions.
: I tried to find any documentation about this behavior. All I found is
: in "Writing Real Programs in DCL" that global symbols should be
: used within procedures, because of the procedure levels with local
: symbols.
I'd be happy to get any text in this book that confuses you updated
for the second edition -- send me the page number, and the confusion,
via e-mail.
|
187.2 | | MILORD::BISHOP | The punishment that brought us peace was upon Him | Wed Feb 12 1997 14:22 | 14 |
| yes you're right...all symbols (local and global) are inherited by the
subprocess (unless you specificallysay you don't want that to happen).
No symbols are propagated back to the parent process when you logout
the subprocess.
global symbols are useful for making symbols visible to an outer
command level (procedure or $-prompt) within the same process. But
there are gotchas even then if you mix local and global symbols of the
same name (been there, done that).
For what you want, I'd suggest a job logical name. Probably other ways
too, but that is the simplest I think.
- Richard.
|
187.3 | OUCH! | WHOS01::BOWERS | Dave Bowers, NSIS/IM | Wed Feb 12 1997 15:54 | 16 |
| >> there are gotchas even then if you mix local and global
>> symbols of the same name
I've still got a hole in my foot from a recent excursion down that
path. The inner command level may create a global symbol, but a local
symbol at the outer level hides it. You can easily create this masking
symbol by simply assigning a value to the name with a single equal
sign. For instance:
foo = f$edit(foo,"UPCASE") !where foo is (or was) a global symbol
Once you've done this, ALL references to "foo" in the outer command
level yield the same value, regardless of changes to the global symbol
by an inner command level.
\dave
|