Control Codes (JCWs)

A Job Control Word (JCW) is one w ord (16 bits) of memory used to pass information between job steps and to determine the status of the previous job step. Figure 3-5 sho ws the structure of a JCW. It is composed of a 2-bit t ype and a 14-bit modi￿er.

The space allowed for JCWs is determined b y the space allowed for your session or job after ￿le equations, temporary ￿les, and data space is tak en. There is alwa ys one system JCW and one user-de￿ned JCW named CIERROR that is actually de￿ned b y Command Interpreter (CI). You can de￿ne as man y user-de￿ned JCWs as remaining space allo ws.

You can use the MPE/iX command :SHOWJCW to see the value of JCWs. If y ou have not de￿ned any JCWs of your own, this shows only the value of the system JCW and CIERROR .

Figure 3-5. Job Control Word (JCW) Structure

System JCW

The system JCW is set b y MPE/iX and some subsystems. Y ou can set the system JCW programmatically b y using intrinsics or in teractively at the Command In terpreter (CI) lev el by using the :SETJCW command.

MPE/iX checks the system JCW before eac h step (process) in a session or job is executed. Based on the system JCW v alue, MPE/iX ma y abort the session or job. Y ou can interactively check the system JCW at the CI lev el by using the :SHOWJCW command. You can programmatically c heck by intrinsics (calling :FINDJCW ) or by using an :IF/THEN , :ELSE , :ENDIF construct.

The system JCW t ype provides information on the sev erity of an error. The modi￿er can be set to identify the cause or to pass information to subsequen t job steps. However, information placed there by the user may not be preserved, because MPE/iX can c hange it. Thus it is frequently expedient to place information that y ou want preserved in a user-de￿ned JCW

Program Development 3-21