Batch Mode Examples [ RJE User/Programmer Reference Manual ] MPE/iX 5.0 Documentation
RJE User/Programmer Reference Manual
Batch Mode Examples
This section is comprised of examples of the use of batch processing in
RJE.
Descriptions
These are brief explanations of the examples following.
Example 1 A batch job that communicates with a remote job
processing system over the public telephone network.
The job transmits one input data set to the remote
processor and receives one list output data set in
return.
Example 2 A batch job that communicates with a remote location
over a private leased line. Data is received from a
remote terminal or system and processed in a user output
procedure. A resulting data set is returned.
Example 3 A batch job that communicates with a remote job
processing system over the public telephone network.
The job deck is a combination of card decks supplied by
several users and the computer operator. The job
transmits three input data sets to the remote processor
and receives multiple output data sets (print and
punch).
Example 1: One Input Data Set, Immediate Output
This example shows you how to put together a complete, self-contained
remote job entry (RJE) batch job that an operator could then run on your
HP 3000 computer system without adding anything to the job. The entire
job is in the form of a disk file and contains one input data set. One
list output data set is expected as a result of the input being
processed.
This example is based on the following assumptions:
Mode of Operation: Batch job.
Device Emulated: IBM 2780.
Remote Processor: A remote job processing system that requires a
/*SIGNON card followed immediately by an EOT
control character at the beginning of the run
and a /*SIGNOFF card at the end of the run.
Communications Link: Public telephone network. The operator of your
HP 3000 computer system must dial to make the
telephone connection with the remote processor.
Transmission Code: EBCDIC.
Input Code: ASCII. RJE automatically converts the input
data from ASCII to EBCDIC at transmission time.
Command File: $STDINX, the standard job input device.
Input File: $STDINX, the standard job input device.
List File: $STDLIST, the standard listing device.
Punch File: Not used.
The job stream is as follows:
!JOB username.acctname
:RJE
#RJLINE 2780;LINECODE=EBCDIC;CONNECT=DIAL,'409-247-7000';DEV=RJLINE
This command states:
* An IBM 2780 is to be emulated.
* The transmission code is to be EBCDIC.
* The communications link is to be established by your computer
operator by dialing the remote processor (409-247-7000) via a modem.
* The maximum number of records per transmission block is to be 7
(nontransparent mode) or 4 (transparent mode).
* No terminal ID is to be transmitted. No RIN is to be used.
* For RJE/XL, a linkname "RJLINE" will be searched for in
NMCONFIG.PUB.SYS. RJE/V will use the first available device
configured under device class "RJLINE".
#RJIN ;TRUNCATE=NO
/*SIGNON REMOTE37 password
This pair of statements specifies that an 80-column card image is to be
transmitted to the remote processor. The /*SIGNON card satisfies the
logon requirements of the host computer. In this case REMOTE37 starts in
column 16.
#RJEOD
This command then completes transmission of the above #RJIN sequence.
Any data remaining in the output buffer (here, the signon card) is
transmitted to the remote processor, along with an EOT control character.
RJE issues a dial message to the operator's terminal. The computer
operator responds by dialing 409-247-7000 on the modem; then entering YES
or NO at the operator's terminal. This is to tell RJE whether the remote
processor answered with an audible carrier signal.
#RJIN
/input data set/
This command transmits one input data set to the remote processor. The
input data set immediately follows the #RJIN command in the job file.
The #RJIN command states the following by default:
That the entire input data set is to be transmitted. No data compression
is to be performed.
* Nontransparent mode is to be used
* Short record truncation is to be performed
* The input data set is in ASCII format
RJE will automatically convert the input to EBCDIC at transmission time.
#RJOUT;WAIT=10
This command executes an implied #RJEOD command, completing the
transmission initiated by the preceding #RJIN command. It then causes
RJE to turn the line around and wait for output from the remote
processor. One output data set will be processed. When received, it
will be passed to the file named $STDLIST (the standard job listing
device). If transmission of the expected output does not begin within 10
minutes, RJE will terminate the #RJOUT command with an error and the
remainder of the job will be flushed by MPE.
#RJIN ;TRUNCATE=NO
/*SIGNOFF
This pair of statements transmits an 80-column card image to the remote
processor. The /*SIGNOFF card terminates the RJE session at the host
system.
#RJEND
This command executes an implied #RJEOD command, completing the
transmission initiated by the preceding #RJIN command. It then
terminates the RJE subsystem and performs a line disconnect operation.
!EOJ
Example 2: Punch Output to a User Procedure
This example shows you how to receive data, process it in a user-written
procedure, and return result data. The example is based on the following
assumptions:
Mode of Operation: Batch job.
Device Emulated: IBM 3780.
Remote Processor: A remote job processing system that requires a
/*SIGNON card followed immediately by an EOT
control character at the start of the run and a
/*SIGNOFF card at the end of the run.
Communications Link: Private leased line. The communications link
is automatically established when an RJE input
or output command is processed.
Transmission Code: ASCII.
Input Code: Binary.
Command File: $STDINX, the standard job input device.
Input File: RTNDATA.
List File: $STDLIST, the standard job listing device.
Punch File: User-supplied procedure PUNCHPROC in your Group
Library.
The job deck is as follows:
!JOB username.acctname
:RJE
#RJLINE 3780;LINECODE=ASCII
This command states the following:
* That an IBM 3780 is to be emulated.
* The transmission code is ASCII.
* The maximum number of records per transmission block is to be 255
(nontransparent mode) or 6 (transparent mode).
* No terminal ID is to be transmitted.
* No RIN is to be used.
* Since the DEV and NODE parameters are omitted, RJE/V will open the
first available device in class "RJLINE". RJE/XL will open one of
the available configured RJE links in NMCONFIG.PUB.SYS (not
recommended).
/*SIGNON REMOTE37 password
The /*SIGNON card satisfies the logon requirements of the host computer.
In this case REMOTE37 starts in column 16.
#RJPUNCH @PUNCHPROC(G)=;OUTCODE=BINARY;WAIT=180
This command states the following:
* An implied #RJEOD command will be performed.
* There will be a waiting period of up to three hours to receive one
output data set.
* Received data will be processed by the user-supplied procedure
PUNCHPROC.
* No code conversion will be performed by RJE.
* Since the communications link is a private leased line, the
connection with the remote processor is established automatically
when the #RJPUNCH command is executed.
#RJIN RTNDATA;XPARENT=YES;INCODE=BINARY
This command states:
* The contents of the file RTNDATA are transmitted in transparent mode.
* This file might have been created and written by the user procedure,
based on received data.
/*SIGNOFF
The /*SIGNOFF card terminates the RJE session at the host system.
#RJEND
This command sequence performs an implied #RJEOD command, completing the
transmission indicated by the preceding #RJIN command. It then
terminates the RJE subsystem and performs a line disconnect operation.
!EOJ
Example 3: Multiple User Input, Immediate Output
This example shows how the operator can combine jobs prepared by several
users into a single RJE job. It is in the form of a punched card deck
and contains three input data sets. Multiple output data sets (print and
punch) are to result from processing the input.
The example is based on the following assumptions:
Mode of Operation: Batch job.
Device Emulated: IBM 2780.
Remote Processor: A remote job processing system that requires a
/*SIGNON card immediately followed by an EOT
control character at the start of the run and a
/*SIGNOFF card at the end of the run.
Communications Link: Public telephone network. The operator of your
HP 3000 computer system must manually make the
telephone connection with the remote processor.
Transmission Code: ASCII.
Input Code: ASCII.
Command File: $STDINX, the standard job input device, is a
card reader.
Input File: $STDINX, the standard job input device, is a
card reader.
List File: $STDLIST, the standard job listing device, is a
line printer.
Punch File: Any card punch in the system. In this example
CP is assumed to be the device class name for
all card punches in the system.
The job deck is as follows:
!JOB username.acctname
:FILE PNCH;DEV=CP
This command equates the device class name CP to the formal file
designator PNCH.
:RJE,,,*PNCH
This command defines the punch file as any card punch in the system.
#RJLINE 2780;CONNECT=DIAL,'247-7000';LINECODE=ASCII;DEV=30
This command states:
* That an IBM 2780 is to be emulated.
* The transmission code is to be ASCII.
* The communications link is to be established by your computer
operator by manually dialing the remote processor (247-7000) via a
modem.
* The maximum number of records per transmission block is to be 7
(nontransparent mode) or 4 (transparent mode).
* No terminal ID is to be transmitted.
* No RIN is to be used.
* RJE/V will open the communications line configured as logical device
30. RJE/XL will use the linkname RJE30 in NMCONFIG.PUB.SYS.
#RJCONTINUE @CS217(P)
This command states:
* That a user procedure CS217 will be executed when RJE detects any
error. (For the purposes of this example, CS217 is assumed to cause
RJE to execute the next command in the command file whenever it
detects CS ERROR 217.
* That RJE will search SL.PUB of the logon account and then SL.PUB.SYS
for the procedure named CS217.
#RJIN ;TRUNCATE=NO
/*SIGNON REMOTE18 password
This pair of statements transmits an 80-column card image to the remote
processor. The /*SIGNON card satisfies the logon requirements of the
host system. In this case REMOTE18 starts in column 16.
#RJEOD
This statement transmits any remaining data in the output buffer along
with an EOT control character to the remote processor, completing the
transmission initiated by the preceding #RJIN command.
#RJIN
This command transmits the first input data set to the remote processor.
The input data set immediately follows the #RJIN command in the job deck.
The #RJIN command states the following:
* That the entire input data set is to be transmitted.
* No data compression is to be performed.
* The nontransparent mode is to be used.
* Short record truncation is to be performed.
* The input data set is in ASCII format.
/input data set #1/
This is supplied by computer operator to the batch input deck.
#RJEOD
This command transmits any remaining data in the output buffer along with
an EOT control character to the remote processor, completing the
transmission initiated by the preceding #RJIN command.
#RJIN
This command transmits the second input data set to the remote processor.
The input data set immediately follows the #RJIN command in the job deck.
The #RJIN command states the following:
* That the entire input data set is to be transmitted.
* No data compression is to be performed.
* The nontransparent mode is to be used.
* Short record truncation is to be performed.
* The input data set is in ASCII format.
/input data set #2/
This part is supplied as user 'A' input.
#RJEOD
This command transmits any remaining data in the output buffer along with
an EOT control character to the remote processor, completing the
transmission initiated by the preceding #RJIN command.
#RJIN
This command transmits the third input data set to the remote processor.
The input data set immediately follows the #RJIN command in the job deck.
The #RJIN command states the following:
* That the entire input data set is to be transmitted.
* No data compression is to be performed.
* The nontransparent mode is to be used.
* Short record truncation is to be performed.
* The input data set is in ASCII format.
/input data set #3/
This part is then supplied as user 'B' input.
#RJEOD
This command transmits any remaining data in the output buffer along with
an EOT control character to the remote processor, completing the
transmission initiated by the preceding #RJIN command.
#RJOUT ,99;WAIT=5
This command causes RJE to turn the line around and wait for output from
the remote processor. The #RJOUT command states that 99 output data sets
are expected. This number was chosen as a convenience so that the same
#RJOUT card could be used in many different runs without having to be
altered. The #RJOUT command will be terminated by RJE whenever 5 minutes
elapse without anything being received from the remote processor.
Normally, if 5 minutes elapsed, a CS ERROR 1,217 would occur and the
remainder of the job would be flushed. However, the user procedure CS217
specifies that when a CS ERROR 217 is detected, RJE continues with the
next command.
#RJIN ;TRUNCATE=NO
/*SIGNOFF
This pair of statements transmits an 80-column card image to the remote
processor. The /*SIGNOFF card terminates the RJE session at the host
system.
#RJEND
This command performs an implied #RJEOD command, completing the
transmission initiated by the preceding #RJIN command. It then
terminates the RJE subsystem and performs a line disconnect operation.
!EOJ
MPE/iX 5.0 Documentation