Interrupt Mode [ RJE User/Programmer Reference Manual ] MPE/iX 5.0 Documentation
RJE User/Programmer Reference Manual
Interrupt Mode
Interrupt mode allows users to submit command files for execution,
preempting a repeating #RJOUT command. To do this, in the MSGFILE
parameter of the #RJLINE command specify a message file which will
contain the name of a command file to which you want to transfer control.
(See discussion below on writing command file names to a message file.)
This will cause an interruption and change of control to the named
command file when one execution of a repeating #RJOUT command stops. For
further discussion of the #RJLINE command, refer to Chapter 3, "RJE User
Commands."
Interrupt mode is dependent on the presence of a message file in the
group and account MSG.RJE. If this group, account and file do not already
exist on the system, they must be created. RJE operates within the logon
group and account of the user. Therefore, the default file security for
this group and account must allow an RJE user in programmatic control
mode to read from files and write to permanent files within the group and
account MSG.RJE. The file itself must be of type MSG, with a record size
large enough to hold a fully qualified file name. The file should be
large enough to accommodate the maximum possible number of records.
User-written applications programs, user- written procedures, and FCOPY
may write records containing command file names to the message file
during normal system operations. The message file must be created in
group and account MSG.RJE. The following commands may be used to create a
message file:
:HELLO MANAGER.RJE,MSG
:BUILD MESSAGE;REC=-36,,V,ASCII;MSG;DISC=100
:BYE
Whenever a user wishes to identify a command file to be used in interrupt
mode, the name of the command file should be written to the message file.
There are several ways to do this; two methods are listed here:
* Use the supported utility program FCOPY.
* Write a routine using FWRITE (see the last example in this chapter).
The advantage of using FCOPY is that it already exists. However, FCOPY
does not verify the existence of the specified message file. A
user-written routine can do this.
Interrupt mode is entered under these conditions:
* An #RJLINE command must identify a message file in its MSGFILE
parameter. A user must have System Supervisor (OP) capability to use
this parameter.
* An #RJOUT command with INTERRUPT=YES is executed. (Entering this
command without identifying a message file in the #RJLINE command
will result in a syntax error.)
If a command file name is present in the message file and the #RJOUT
command has concluded one execution, the control of the subsystem is
passed to that command file.
Once a command file has completed processing, control of the subsystem is
returned to the original repeating #RJOUT command.
The simplest form of interrupt processing is to interrupt the repeating
#RJOUT in the command file specified at the start of RJE subsystem
execution. Interrupt with another command file and return to the
repeating #RJOUT command after all commands in the interrupting command
file have been executed. The following are examples of more complex
forms of interrupt processing:
* Specify an interrupting command file name in the message file. In
the new command file, use the #RJCMDFILE command to identify
subsequent command files. This subsystem command is described in
Chapter 3, "RJE User Commands."
* Specify an interrupting command file name in the message file. In
the new command file bring interrupt mode processing to a conclusion
with an INTERRUPT=NO. The remaining commands in that command file
will be executed and the next command file will be $STDLIST.
* The RJE terminal operator may stop execution of the current command
file by entering a [CTRL]-Y from an interactive terminal. Refer to
the "Use of [CTRL]-Y" in this chapter for information on programmatic
control processing.
* #RJCONTINUE, #RJSTAT, and all RJE subsystem commands that move data
between one system to another may specify user-supplied procedures.
These reside in an SL file. User-supplied procedures related to data
movement commands can analyze data passed and, based on data
condition, add command file names to the message file for future
processing. The #RJCONTINUE and #RJSTAT commands can add command
file names to the message file based upon error conditions and
performance information, respectively.
Interrupt mode processing is terminated when:
* A [CTRL]-Y is issued from the interactive terminal from which
interrupt mode has been initiated,
* A command file issues an #RJOUT command in which the INTERRUPT=NO, or
the REPEAT=NO parameters are set. The remaining commands in that
command file will be executed and the next command file will be
$STDLIST.
MPE/iX 5.0 Documentation