home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!lrw.com!leichter
- From: leichter@lrw.com (Jerry Leichter)
- Newsgroups: comp.os.vms
- Subject: re: Re: Passing parameters to detached processes.
- Message-ID: <9212301623.AA19674@uu3.psi.com>
- Date: 30 Dec 92 15:11:51 GMT
- Sender: usenet@ucbvax.BERKELEY.EDU
- Organization: The Internet
- Lines: 51
-
-
- In article <1992Dec29.020155.5303@news2.cis.umn.edu>,
- rao@moose.cccs.umn.edu (Rao Akella) writes:
- >
- |>
- |>I'm running a command procedure in a detached process, invoking it
- |>as follows:
- |>
- |> $ RUN SYS$SYSTEM:LOGINOUT/INPUT=PROC.COM/OUTPUT=PROC.OUT/DETACH
- |>
- |>Is there any way to pass parameters to PROC.COM?
- |>
-
- Not through the RUN command. Some alternatives.
-
- 1. Specify /INPUT=PROC2.COM which contains the line:
-
- $ @PROC parameters
-
- 2. Use SUBMIT/PARAM
-
- 3. Use SPAWN (though you can't get a detached process this way.)
-
- 1-3 work just fine.
-
- 4. Use /ERROR="parameter string" and translate SYS$ERROR in the
- procedure to retrieve the parameters. You should probably
- then do a $DEFINE SYS$ERROR SYS$OUTPUT. This is a hack and
- not something I'd recommend.
-
- Not only that, but in the case at hand, it doesn't work; what you'll find in
- SYS$ERROR is a PPF that's the same as SYS$OUTPUT. (I'm not sure exactly who
- "fixes this up" and where, but the original value of /ERROR is simply not
- accessible by the time LOGINOUT gives the command file control.)
-
- You CAN pass a small amount of information through by setting the process
- name - but PROC.COM would have to know enough to look for the information
- there. If I'm reading the original question correctly, what's desired is a
- way for the information to appear in PROC's P1-P8, exactly as it "normally"
- does.
-
- Passing information through the process name is also a hack, and requires care
- to avoid chosing a name that conflicts with an existing process (in which case
- the proposed name would be ignored" - but while it's an "unexpected" use of a
- documented, supported interface, I'd have to call it documented and supported
- nontheless.
-
- Note that running LOGINOUT to map the CLI in this way is itself undocumented
- and unsupported....
- -- Jerry
-
-