HP OpenVMS Systems

ask the wizard
Content starts here

Processes, Subprocesses, Logicals, Symbols?

» close window

The Question is:

Please see the below example, "abc" logical is defined in the parent process
 and "xyz" is defined in sub-process.
From Subprocess, I could able to get the logical of "abc" and "xyz". But after
 the control comes back to Parent process, I am unable to get the "xyz" logical
 which is specified in the child process.
How can I get this?  Is there any way to redirect the child logical also to the
 parent process?
$ define abc "disk1:[000000]"
$ spawn
%DCL-S-SPAWNED, process SYSTEM_1 spawned
%DCL-S-ATTACHED, terminal now attached to process SYSTEM_1
$ define xyz "disk2:[000000]
$ show logical abc
   "ABC" = "disk1:[000000]" (LNM$PROCESS_TABLE)
$ show logical xyz
   "XYZ" = "disk2:[000000]" (LNM$PROCESS_TABLE)
$ lo
  Process SYSTEM_1 logged out at 12-AUG-2004 15:25:34.29
%DCL-S-RETURNED, control returned to process SYSTEM
$ show logical abc
   "ABC" = "disk1:[000000]" (LNM$PROCESS_TABLE)
$ show logical xyz
%SHOW-S-NOTRAN, no translation for logical name XYZ

The Answer is :

  Process logical names and symbols are copied into -- copied, and not
  shared with -- a newly-created subprocess by default.  This copying
  can be disabled via lib$spawn control flag or via SPAWN qualifiers.
  Process logical names and symbols are not shared across processes,
  whether in the same job tree or not.  Further, process logical names
  and symbols are not copied back to the parent process when the
  subprocess exits.
  You can potentially use a shared logical name table such as the
  job table to share data among the processes that can access the
  chosen logical name table, or you can use a file or any other
  interprocess communications mechanism to propogate data among
  cooperating processes.
  Please also see the OpenVMS FAQ and its discussion of pipes and
  Related topics include (9756), (9468), (8931), (8763), (7951),
  (7356), (6893), (6383), (6380), (5981), (5589), (5303), (2937),
  (1960), (1760), (1414), and likely other topics.
  Other topics such as (5982) and (159) may be of some interest,
  as well, as these discuss interprocess communications.
  The OpenVMS DCL Dictionary and the OpenVMS User's Guide in
  the OpenVMS manual set, as well as the Guide To Writing Real
  Programs in DCL book may also be of some interest.  Various
  other resources are referenced in the OpenVMS FAQ.

answer written or last revised on ( 12-AUG-2004 )

» close window