(9808) Subsystem Identifiers and SPAWN?

Archive of the OpenVMS Ask the Wizard (ATW) questions and answers database.
Locked

Topic author
User
Visitor
Posts: 0
Joined: Mon Jan 10, 2022 8:16 am
Reputation: 0
Status: Offline

(9808) Subsystem Identifiers and SPAWN?

Post by User » Tue Aug 24, 2004 9:26 am

I am trying to spawn a cms command procedure from a COBOL programm running
under a subsystem. I'm using the LIB$SPAWN call and setting the SUBSYSTEM bit.
When LIB$SPAWN is called, the protected subsystem identifier is not passed to
the spawned process, wh
ich is contrary to the LIB$ RTL REF manual. What do I need to do to resolve the
problem.

EX:

01 SUBSYSTEM PIC S9(09) COMP VALUE 256.

CALL "LIB$SPAWN" USING BY DESCRIPTOR "show process/priv"
omitted
omitted
BY REFERENCE SUBSYSTEM
GIVING CALL_STATUS.


Wizard
Visitor
Posts: 0
Joined: Mon Jan 10, 2022 8:17 am
Reputation: 0
Status: Offline

Re: (9808) Subsystem Identifiers and SPAWN?

Post by Wizard » Wed Aug 25, 2004 9:26 am

Use of callable CMS would be recommended.

Subsystem identifiers are effectively not passed and not passable
to DCL procedures, as the identifier exists in the subprocess only
until the first image is run down. That image, in the case of a
DCL spawn, is LOGINOUT. (As currently implemented within OpenVMS,
the SUBSYSTEM flag is not particularly useful on a SPAWN operation.
The SUBSYSTEM flag on $creprc can be more useful, save for cases
where that mechanism is used to start DCL via LOGINOUT, obviously.)

The approach the OpenVMS Wizard uses tends to be asked on DECnet
task-to-task or other such interprocess communications with a
trusted server process, and that server then invokes the necessary
commands and DCL procedures. Related general examples include
topic (159).

The OpenVMS Wizard also makes extensive use of callable CMS.

Locked