HP 3000 Manuals

Job Control Words [ Interprocess Communication:Programmer's Guide ] MPE/iX 5.0 Documentation


Interprocess Communication:Programmer's Guide

Job Control Words 

Job Control Words (JCWs) are a subset of variables.  A JCW is an integer
variable in the range 0 through 65535, and contains an internal "flag"
(set by one of the JCW commands or intrinsics) that makes it recognizable
to the system as a JCW. All the variable intrinsics and commands
discussed above can be used to manipulate JCWs; however, the JCW commands
and intrinsics will recognize and affect only those variables flagged as
JCWs.

It is possible to reclassify JCWs as variables, or vice versa, by using
the appropriate intrinsics to change their values.  However, not all JCWs
and variables can be changed.  The JCWs CIERROR and JCW cannot be
reclassified as standard variables, because system processes depend upon
the fact that these variables can always be accessed and altered using
JCW intrinsics.  Also, predefined standard variables such as HPPATH
cannot be reclassified as JCWs.

For a list of predefined variables and JCWs, refer to the MPE XL Commands
Reference Manual, Appendix A.

Using the Predefined JCW for Interprocess Communication 

Two processes belonging to the same job or session can communicate with
each other through the predefined Job Control Word JCW. This word enables
a subsystem process to return information to the job or session that
initiated the process.  This communication mechanism is used by the
command executors for :RUN, and by various subsystem commands (for
example, compilers).  However, you may find this control word helpful in
other applications.

Using User-Defined JCWs for Interprocess Communication 

MPE XL allows you to establish and manipulate user-defined Job Control
Words.  This capability overcomes one of the disadvantages of using the
system-defined Job Control Word:  MPE XL uses JCW for status information,
and you cannot be sure that MPE XL will not modify it, thus possibly
changing the information you want to pass in JCW. (MPE XL clears bits
(0:2) of JCW, but the remaining bits are user-definable.)

A user-defined JCW is a 16-bit word that resides in the session variable
table managed by MPE XL. This table, which also holds the system-defined
JCWs, is shared by all processes in a job or session; thus any process of
a job can access any JCW in the table.


MPE/iX 5.0 Documentation