I'm trying to pass information between main process and subprocess ( learning how this all works in the process) I need to get information from the subprocess, in this case the value of g_start. This is the way i seen online to handle this, if there is a better way please let me know!
Main file contains
$ define/job/nolog g_start false
$ g_test == 6
$ spawn @test.com
$ if f$trnlnm(g_start) .eqs. true
$ then
File test.com contains:
$ If g_test .nes. 5
$ then
$ define/job g_start true
$ endif
$ logout
When running the main file g_test is not found what am I doing wrong that I'm not getting data to pass back and forth between main processes and subprocesses.
DCL symbols (g_test
) aren't shared between processes. Using shared logical names, e.g. in the job table, will work.
More advanced communications, e.g. passing messages, may be done using mailboxes.
EDIT: To clarify, spawn/symbols
will cause symbols to be copied to the subprocess on creation, but that creates a new set of symbols. The parent process then goes its merry way and any symbol updates in either process occur independently.