HP 3000 Manuals

##RJCMDFILE [ RJE User/Programmer Reference Manual ] MPE/iX 5.0 Documentation


RJE User/Programmer Reference Manual

#RJCMDFILE 

The #RJCMDFILE command causes RJE to stop processing subsystem commands
from its current source and to begin processing subsystem commands from a
new source.

Syntax 

     #RJCMDFILE  [command file reference]

Parameters 

You can specify the following parameter with the #RJCMDFILE command.

     command file      The command file reference in this subsystem command may be any
                       of the following:
        reference       
                       logical device number
                       "device class name"
                       actual file designator
                       *formal file designator

                       See appendix B, "Using RJE Files," for additional information on
                       command files.

                       Default:  The default command file for this subsystem command is
                       $STDINX.

Comments 

This command causes RJE to stop processing commands from its current
command file and start processing commands from the specified command
file reference.  Command files are unnumbered files which may contain
subsystem commands only.  The subsystem commands must begin with a pound
sign (#).  There may be only one subsystem command in a logical record of
a command file.

If an #RJCMDFILE subsystem command occurs within a command file, RJE
closes the current command file and opens the command file designated by
this subsystem command.  Once RJE has finished processing from the new
command file, it begins processing subsystem commands from a new command
file as determined by the following specifications:

 *  If RJE is not in programmatic control mode, the new command file will
    be $STDINX for interactive mode.  If in batch mode, the subsystem
    will end.

 *  If RJE is in programmatic control mode (an #RJOUT command is
    executing with the INTERRUPT parameter set to YES and if a valid
    message file has been designated by the MSGFILE parameter of the
    #RJLINE command, the subsystem will examine the message file to see
    if there is a pending command file.  If there is a command file entry
    in the message file, then RJE begins processing commands from that
    command file.  If there is no command file entry in the message file,
    then RJE repeats the #RJOUT subsystem command.

If the command file specified in the subsystem command #RJCMDFILE cannot
be opened, a command file error message will be displayed and one of the
following will occur:

 *  If RJE is being executed in batch mode, an #RJEND subsystem command
    will be executed and control will be returned to MPE.

 *  If RJE is being executed in normal interactive mode, $STDINX will
    become the command file.

 *  If RJE is being executed with programmatic control, the repeating
    #RJOUT subsystem command will be executed.

[CTRL]-Y 

If a user is in interactive mode and specifies a command file using the
#RJCMDFILE subsystem command, and this command file contains a
[CTRL]-Y-interruptible command, subsequent commands will not be executed
after a [CTRL]-Y is entered.  The command file will then be closed and
control will return to the interactive terminal.  For further information
on [CTRL]-Y, refer to Chapter 5, "Using RJE in Programmatic Mode."

Examples 

The following examples show different uses of the #RJCMDFILE command and
its parameters.

Example 1 

     #RJCMDFILE TASKS

This command states that RJE will stop processing commands from its
current source and begin to process commands from the file TASKS of the
logon group and account.  If this file can be opened, processing will
continue as discussed in the preceding "Comments" section.  If RJE is
being executed in batch mode and TASKS cannot be opened, then an orderly
exit from the subsystem will take place.  If RJE is being executed in
interactive mode, and the command file cannot be opened, then $STDINX
will become the command file.

Example 2 

     #RJCMDFILE CMDEX1

This states that RJE will stop processing commands from the current
command file and use file CMDEX1 of the logon group and account.  Assume
that file CMDEX1 contains the following commands:

     #RJIN IBMJOB
     #RJOUT IBMREPLY;WAIT=0
     #RJEND

File CMDEX1 is the newly designated command file.  A file named IBMJOB
will be transmitted from the logon group and account to the host system.
The line will be turned around.  An #RJOUT command will be specified to
receive one data set in file IBMREPLY of the logon group and account,
waiting indefinitely to receive output.  Upon receipt of the data set the
user exits from RJE to return control to the operating system.

Example 3 

     #RJCMDFILE CMDEX2

This states that RJE will stop processing commands from the current
command file and use file CMDEX2 of the logon group and account.  Assume
that file CMDEX2 contains the following commands:

     #RJIN APWORK
     #RJOUT @APREPORT;REPEAT=YES;WAIT=0
     #RJEND

First, file APWORK of the logon group and account will be transmitted to
the host system.  The #RJOUT command will then be executed.  Since there
is a REPEAT=YES in the #RJOUT command, the #RJOUT command will continue
to execute until the user enters a [CTRL]-Y. After the user enters a
[CTRL]-Y, RJE will begin processing commands from $STDINX and will not
process the #RJEND subsystem command in file CMDEX2.

The $STDLIST output relating to the commands in this example will look
like the following:

     #RJCMDFILE CMDEX2

File CMDEX2 is the new command file.

     #RJIN APWORK

This is in CMDEX2.

     #RJOUT @APREPORT;REPEAT=YES;WAIT=0

This is in CMDEX2.
A data set is received and processed.

     *** SAVED RJOUT IS NEXT ***
     RJOUT @APREPORT;REPEAT=YES;WAIT=0

Printed onto $STDLIST.
A data set is received and processed.

     *** SAVED RJOUT IS NEXT ***
     RJOUT @APREPORT;REPEAT=YES;WAIT=0

Printed onto $STDLIST.
A data set is received and processed.

This sequence continues indefinitely.

When a user enters a [CTRL]-Y from the interactive terminal.  The RJE
subsystem will respond with a prompt character.

     #RJEND

Entered by the user after a subsystem prompt (#).  Control is now
returned to the operating system.

An MPE operating system command may be entered.

Example 4 

The following example describes the use of a command file together with
the use of a set of command file names present in a message file.

     #RJCMDFILE CMDEX3

File CMDEX3 is the new command file.

     #RJOUT @PROC;INTERRUPT=YES;WAIT=0

From file CMDEX3.

     *** RJOUT INTERRUPTED: MSG. FILE
     *** NEW COMMAND FILE: RJCMD1

Printed on $STDLIST.
File name taken as entered in message file.

The following commands are from RJCMD1:

     #RJIN JOB1

One data set is transmitted to the host from JOB1 of the logon account.

     #RJOUT MSG1;WAIT=0

A data set is received from the host and is stored in file MSG1 of the
logon account.

     * COMMAND FILE END OF FILE *

End of RJCMD1.

     *** SAVED RJOUT IS NEXT ***
     RJOUT @PROC;INTERRUPT=YES;WAIT=0

Printed on $STDLIST.
From file CMDEX3.

     *** RJOUT INTERRUPTED: MSG. FILE
     *** NEW COMMAND FILE: RJCMD3

Printed on $STDLIST.
File name taken as entered in message file.

The following commands are from file RJCMD3:

     #RJIN JOB6

One data set is transmitted from JOB6 of the logon account to the host.

     #RJOUT MSG6;WAIT=0

A data set is transmitted to file MSG6 from the host system.

     #RJIN JOB7

One data set is transmitted from JOB7 of the logon account to the host.

     #RJOUT MSG7;WAIT=0

A data set is transmitted to file MSG7 from the host system.

     *COMMAND FILE END OF FILE*

No more data in command file.

     *** SAVED RJOUT IS NEXT ***
     RJOUT @PROC;INTERRUPT=YES;WAIT=0

Printed on #STDLIST.
From file CMDEX3.

The RJE subsystem will execute all command files listed in a message file
named in the #RJLINE command by its MSGFILE parameter.  The saved #RJOUT
will then be executed until the user enters a [CTRL]-Y at the terminal.
Command control is then returned to the terminal.



MPE/iX 5.0 Documentation