HP 3000 Manuals

Interactive Mode Examples [ RJE User/Programmer Reference Manual ] MPE/iX 5.0 Documentation


RJE User/Programmer Reference Manual

Interactive Mode Examples 

This section is comprised of examples of the use of interactive
processing in RJE.

Descriptions 

These are brief explanations of the examples following.

Example 4        Two interactive sessions that communicate with a remote
                 job processing system over the public telephone network.
                 The first session transmits one input data set to the
                 remote processor and then terminates.  The second
                 session receives the list output data set generated as a
                 result of the first session's input being processed.

Example 5        An interactive session that communicates with an IBM
                 2780 Data Transmission Terminal.  The RJE command
                 sequence is permanently stored in a file on disk and is
                 executed periodically by the computer operator by means
                 of a three- command MPE session.  The RJE command
                 sequence receives a variable number of punched output
                 data sets that are stored in a disk file when they are
                 received.

Example 6        An interactive session that transfers a file from one HP
                 3000 computer system to another.

Example 7        An interactive session that communicates with an IBM
                 host which supports HASP, emulating an IBM 3780 Data
                 Communication Terminal.  A FORTRAN program, stored in an
                 HP 3000 disk file, is sent to the host where it executes
                 to generate output for one standard and two nonstandard
                 forms.

Example 8        One interactive session communicates with an IBM host
                 and repeats its #RJOUT command.

Example 4:  One Input Data Set, Deferred Output 

This example shows you how to use an interactive session to transmit a
remote job entry (RJE) input data set to a remote processor and retrieve
the resulting output in a subsequent session.  In the first session, RJE
commands are entered through an interactive terminal and the input data
set is read from disk file.  In the second session, the RJE commands are
again entered through an interactive terminal while the output data set
is passed to a line printer.

The example is based on the following assumptions.

Mode of Operation:        Interactive session.

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 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 manually 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:             Interactive terminal, $STDINX, the terminal
                          through which the session was initiated.

Input File:               $STDINX for /*SIGNON and /*SIGNOFF card images
                          and disk file, INFILE, for input data set.

List File:                Line printer, logical device number 6.

Punch File:               Not used.

The first session is as follows:

     :HELLO username.acctname
     :RJE
     #RJLINE 2780;LINECODE=EBCDIC;CONNECT=DIAL,'247-7000';DEV=130

This command states the following:

 *  That 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 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
    130.  RJE/XL will use the linkname RJE130 in NMCONFIG.PUB.SYS.

     #RJIN ;TRUNCATE=NO
     /*SIGNON       REMOTE72 password

This pair of entries specifies an 80-column card image to be transmitted
to the remote processor.  The /*SIGNON card satisfies the logon
requirements of the host system.

     #RJEOD

This command then completes transmission of the above #RJIN sequence.
RJE attempts to send all of the data in the output buffer to the remote
processor along with an EOT control character.  A dial message is issued
to the operator's terminal.  The computer operator responds by dialing
247-7000 on the modem; then entering YES or NO through the operator's
terminal.  This is to tell RJE whether the remote processor answered with
an audible carrier signal.


NOTE Since the command file and the input file are the same and RJE is currently in the input mode, the # prompt character is not issued by RJE. It must be entered by the user as part of the #RJEOD command or by entering a [CTRL]-Y before the #RJEOD command.
#RJIN INFILE This command transmits one input data set, from the disk file INFILE, to the remote processor. 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. * RJE will automatically convert the input to EBCDIC at transmission time. #RJEOD This command transmits any data remaining in the output buffer along with an EOT control character to the remote processor, completing the transmission started by the preceding #RJIN command. #RJIN ;TRUNCATE=NO /*SIGNOFF This pair of entries transmits an 80-column card image to the remote processor. The /*SIGNOFF card terminates the RJE session at the host system. #RJEND This command transmits any data remaining in the output buffer along with an EOT control character to the remote processor, completing the transmission initiated by the preceding #RJIN command, terminates the RJE subsystem and performs a line disconnect operation. :BYE The subsequent session is as follows: :HELLO username.acctname :RJE #RJLINE 2780;LINECODE=EBCDIC;CONNECT=DIAL,'247-7000';DEV=130 This command states the following: * That 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 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 130. RJE/XL will use the linkname RJE130 in NMCONFIG.PUB.SYS. #RJIN ;TRUNCATE=NO /*SIGNON REMOTE72 password This pair of entries specifies an 80-column card image to be transmitted to the remote processor. The /*SIGNON card satisfies the logon requirements of the host system. #RJOUT 6;WAIT=5 This command completes the signon sequence begun above by executing an implied #RJEOD command and causing 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 logical device 6 (assumed to be a line printer in this example). If transmission of the expected output does not begin within 5 minutes, RJE will terminate the #RJOUT command with an error and prompt you for the next command.
NOTE Since the command file and the input file are the same and RJE is currently in the input mode, the # prompt character is not issued by RJE and must be entered by the user as part of the #RJOUT command or by entering a [CTRL]-Y preceding #RJOUT.
#RJIN ;TRUNCATE=NO /*SIGNOFF This pair of entries transmits an 80-column card image to the remote processor. The /*SIGNOFF card terminates the RJE session at the host system. #RJEND This command transmits any data remaining in the output buffer along with an EOT control character to the remote processor, completing the transmission initiated by the preceding #RJIN command, terminates the RJE subsystem and performs a line disconnect operation. :BYE Example 5: Executing a Disk Resident RJE Command Sequence This example shows you how to execute a disk resident RJE command sequence by means of a three command MPE session. Disk resident command files can be created when a commonly used command sequence must be executed on a regular basis. The case shown in this example involves an installation that must establish a connection several times a day with a remote IBM 2780, accept a variable number of punched output data sets; then terminate the connection. This example is based on the following assumptions: Mode of Operation: Interactive session. Device Emulated: IBM 2780. Remote Processor: An IBM 2780 which transmits order processing information in the form of 80-character records; one record per order. The orders are grouped into data sets; one data set per product line. 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. Output Code: ASCII. Command File: A disk file named RJCMND. Input File: Not used. List File: $STDLIST, the interactive terminal through which the session is initiated. Punch File: A disk file named ORDFIL. Assume that the following RJE command sequence is stored in the disk file named RJCMND: #RJLINE 2780;CONNECT=DIAL,'247-7000';LINECODE=ASCII;DEV=RJE30 This command states the following: * That an IBM 2780 is to be emulated. * The transmission code is ASCII. * The communications link is to be established by the computer operator by manually dialing the remote processor (247-7000) via a modem. * The maximum number of records per transmission block is 7 (nontransparent mode) or 4 (transparent mode). * No terminal ID is to be transmitted. * No RIN is to be used. * For RJE/XL, linkname RJE30 will be searched for in NMCONFIG.PUB.SYS. RJE/V will open the first available communications device under device class "RJE30". #RJPUNCH ,99;WAIT=10 RJE issues a dial message to the operator's terminal. The computer operator responds by dialing 247-7000 on the modem and entering YES or NO at the operator's terminal to tell RJE whether the remote processor answered. RJE waits for output from the remote processor. The #RJPUNCH command states that 99 unrouted punched output data sets are expected. This number was chosen so that the RJE command sequence could be used repeatedly without the #RJPUNCH command having to be altered. The #RJPUNCH command is terminated automatically by RJE whenever 10 minutes elapse without anything being received from the remote processor (a CS ERROR 1,217 will be displayed). When received, the output data sets will be passed to the disk file named ORDFIL. #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. When the RJE command sequence is to be executed, the computer operator executes the following MPE commands through an interactive terminal: :HELLO username.acctname :RJE RJCMND,,,ORDFIL This command invokes RJE and defines the four RJE files as follows: * Command file: A disk file named RJCMND. * Input file: Not used. * List file: $STDLIST, the interactive terminal through which the session is initiated. * Punch file: A disk file named ORDFIL. :BYE Example 6: HP 3000 to HP 3000 File Transfer This example shows you how to use RJE to pass a file from one HP 3000 computer system to another. The RJE command sequences for each computer system are shown below. Since the receiving system (System B in this example) must start executing RJE commands before the telephone connection is established, the overall operation must be coordinated either by a schedule or verbal communication between the operators of the two computer systems. In this example it is assumed that the file transfer takes place at 4:00 PM every day. The example is based on the following assumptions: System A Mode of Operation: Interactive session. Device Emulated: IBM 3780. Communications Link: Public telephone network. The computer operator must manually make the telephone connection with System B. Transmission Code: ASCII. Input Code: ASCII. Output Code: Not applicable. Command File: $STDINX, the interactive terminal through which the session is initiated. Input File: A disk file named XFILE. Punch File: Not applicable. System B Mode of Operation: Interactive session. Device Emulated: IBM 3780. Communications Link: Public telephone network. The telephone connection is automatically established when an incoming call is detected by the modem after the #RJLINE command has been executed. Transmission Code: ASCII. Input Code: Not applicable. Output Code: ASCII. Command File: $STDINX, the interactive terminal through which the session is initiated. Input File: Not applicable. Punch File: A disk file named HPFILE. The command sequences are as follows: System B At 3:55 p.m. a user at System B enters the following: :HELLO username.acctname :RJE #RJLINE 3780;CONNECT=ANSWER;LINECODE=ASCII;DEV=RJE130 This command states: * That an IBM 3780 is to be emulated. * The transmission code is to be ASCII. * The modem is to start monitoring the line for an incoming call. * No RIN is to be used. * For RJE/XL, linkname RJE130 will be searched for in NMCONFIG.PUB.SYS. RJE/V will open the first available communications device under device class "RJE130". #RJPUNCH HPFILE;OUTSIZE=128 As soon as the communications link has been established, this command causes RJE to accept an output data set from System A. When received, the output data set will be passed to the disk file named HPFILE. Since the received data is transparent, it will be processed as 128- word records rather than 80-byte records as would be the case if the OUTSIZE parameter were not specified. At this point in the run, RJE merely waits (pauses) until the communications link is established and data transmission is begun. System A At 4:00 a user at System A enters these commands: :HELLO username.acctname :RJE #RJLINE 3780;CONNECT=DIAL,'415-857-1501';LINECODE=ASCII;DEV=RJE80 This command states the following: * An IBM 3780 is to be emulated. * The transmission code is to be ASCII. * The communications link is to be established by the computer operator by manually dialing System B (415-857-1501) via a modem. * No terminal ID is to be transmitted. * No RIN is to be used. * For RJE/XL, linkname RJE80 will be searched for in NMCONFIG.PUB.SYS. RJE/V will open the first available communications device under device class "RJE80". #RJIN XFILE;XPARENT=Y;MAXSIZE=128 This command transmits one input data set to System B. Before transmission can begin, the dial message will be displayed at the operator terminal. The input data set is read from the file named XFILE on disk. The #RJIN command states the following: * That the entire input data set is to be transmitted * No data compression is to be performed. * The transparent mode is to be used. * Short record truncation is not to be performed. * The input data set is in ASCII format. * The maximum input record size is 128 words. #RJEND This command executes an implied #RJEOD command, completing the transmission initiated by the preceding #RJIN command; then terminates RJE. :BYE System B After the data from System A has been received, the user at System B ends his RJE session: #RJEND This command terminates the RJE subsystem and performs a line disconnect operation. :BYE Example 7: A FORTRAN Job Sends Output to Multiple Forms At times, RJE users would like to vary the forms for the output of different data sets. This example illustrates the use of special forms with RJE. Output is sent to one standard and two nonstandard forms from the FORTRAN program shown at the end of this discussion of Example 7. It illustrates the commands submitted at the terminal, the prompts printed on the system console, the dialing procedure and the replies required of the console operator in order to retrieve the output. The example uses the standard 'Operator-controlled Mode' that is supported by HASP. For more information about this mode, refer to the OS/VS2, HASP II Version 2, Operator's Guide (IBM part number GC27-6993). On the HP 3000, the example uses the normal printer spooling capabilities. The example is based on the following assumptions: Mode of Operation: Interactive session. Device Emulated: IBM 3780. Remote Processor: IBM host computer supporting HASP. Communications Link: Half-duplex modem operating with a dial network. Transmission Code: EBCDIC. Input Code: ASCII. Command File: Interactive session terminal. Input File: IBMF3. List File: Line printer (logical device 6). Punch File: Not used. Legend of Terminal and Terminal Prompts: : MPE prompt for input from a user # RJE prompt for input from a user /* IBM job control command /*$ HASP subsystem command $ HASP response to a user = Console operator prompt for MPE attention [CTRL]-A ? MPE prompt to the terminal operator for a reply :HELLO username.acctname :FILE LP;DEV=LP This file definition for the line printer will be used from the RJE subsystem for #RJLIST output. :RJE This command invokes RJE and defines the RJE files by default. #RJLINE 3780;DEV=30;LINECODE=EBCDIC;CONNECT=DIAL, 857-1501 This command states that the IBM 3780 is to be emulated. RJE/V will open the communications line configured as logical device 30. RJE/XL will use the linkname RJE30 in NMCONFIG.PUB.SYS. The console operator will be prompted to dial 857-1501 at the appropriate time. #RJIN /*SIGNON REMOTE30 password #RJEOD The #RJIN command puts the /*SIGNON card into the output buffer. The #RJEOD command attempts to send the output buffer along with an EOT control character to the IBM host. A dial message is issued to the console operator. At the HP 3000 console: RJE/V: ?ST/19:32/28/LDEV#14 DIAL 857-1501.ANSWER? (Y/N) =REPLY 28,Y RJE/XL: ?/19:32/28/DIAL 857-1501 FOR PATH/xx.ANSWER? (Y/N) The dial message is printed on the system console. Before responding, the operator places the call, receives the carrier tone and presses the DATA button. With RJE/V, the operator replies with Y. With RJE/XL, the next command in the job will be read automatically. (A successful connection removes the request for a reply.) #RJIN IBMF3 #RJEOD These commands transmit the FORTRAN program to the remote processor from an HP 3000 disk file named IBMF3. The input is in ASCII format but RJE automatically converts it to EBCDIC for transmission. The program uses the FORTGCLG IBM subsystem. It also uses the standard JCL provided by the host except that logical devices 3 and 7 are specified for nonstandard forms. The STP3 file equations, shown in the program listing in figure 4-1, replace the standard JCL. However, because the JCL provided by the host is installation dependent, the STP3 file equations may differ for each IBM host system. #RJOUT;WAIT=2 $19.33.04 JOB 116 ON RM30.RD1 - GSDX2769 BRAWN The #RJOUT command allows the HASP system to transmit the number it has assigned to this job, J116, on the host system. At this point, the job has been submitted through the HASP subsystem, it has been spooled on the host input spooling device, the JCL library procedure has been added to the job and the standard JCL definitions for devices 3 and 7 have been replaced by the //STP3 file equations in the FORTRAN program. #/*$DJ116 $19.39.00 JOB 116 GSDX2769 EXECUTING G PRIO 4 This command requests the status of J116. The host response indicates the job is active, awaiting execution. This means that all the required system resources are available for its execution and that the JCL is satisfactory. The job is queued by priority to await CPU execution. #/*$DF $19.50.19 OUT 30 F=C333 C=6 T=**** CLS C=1 $19.50.19 OUT 30 F=C777 C=6 T=**** CLS C=1 $19.50.19 OUT 30 F=STD. C=6 T=**** CLS A=2 This command requests that the host system display the status of files associated with the job. The response indicates the job has executed, its output has been spooled and the data sets are now available to HASP for output to the physical device. The response shows that output is assigned to the nonstandard forms specified in the FORTRAN STP3 file equations, as well as to the standard printer output device (device 6). #/*$T RM30.PR1,F=C333,Q=C $20.09.22 OK This command configures the HASP printer for the nonstandard form, C333. HASP can now transmit any pending data sets that require this nonstandard form (in this case, one data set). #RJLIST *LP;FORMSMSG=C345 This command signals HASP to transmit the first data set. It also specifies a FORMSMSG for the HP 3000 spooler. The form assigned on the HP 3000, C345, is independent of the form designated on the IBM host. At the HP 3000 terminal: IO/20:11/14/FORMS: C345 ?IO/20:11/14/SP#6/ IS #S101;LP on LDEV#6 (Y/N) =REPLY 14,Y ?IO/20:16/14/LDEV#6 FORMS ALIGNED OK? (Y/N) =REPLY 14,Y At this point the first data set has been transferred to a HP 3000 spool file. The first message to the system terminal states which form is required for the output. It is followed by a prompt asking if the form is available. The second prompt asks whether the form is properly aligned on the line printer. After the system operator responds Y to the questions, the output is printed in the format: HASP banner, output data, HASP banner. Note that the actual printing of spooled output is handled by the MPE Spooler subsystem; not by RJE. The two are independent. #/*$T RM30.PR1,F=STD.,Q=A $20.11.04 OK This command reconfigures the HASP printer for standard output file. #RJLIST *LP;WAIT=2 This command signals HASP to transmit the second data set. At the HP 3000 terminal: ?IO/20:17/14/SP#6/ IS #S101;LP ON LDEV#6 (Y/N) =REPLY 14,N ST/20:18/SP#6/#0195 DEFERRED The second data set has been transferred to an HP 3000 spool file. However, in this case, the operator defers printing until a later time by responding NO to the request for output device assignment. This changes the priority of the spool file to 0. #/*ST RM30.PR1,F=C777,Q=C $20.12.23 OK This command configures the HASP printer for nonstandard form, C777. Now HASP can transmit any data sets that require this form (in this case, one data set). #RJLIST *LP;FORMSMSG=C778 This command signals HASP to transmit the third data set. It also specifies a FORMSMSG for the HP 3000 spooler. The form assigned on the HP 3000, C778, is independent of the form designated on the IBM host. At the HP 3000 terminal: IO/20:18/14/FORMS: C778 ?IO/20:18/14/SP#6/ IS #S101;LP ON LDEV#6 (Y/N) =REPLY 14,Y ?IO/20:23/14/LDEV #S6 FORMS ALIGNED OK? (Y/N) =REPLY 14,Y At this point, the third and last data set has been transferred to a HP 3000 spool file. The HP 3000 system prompts the terminal operator for the nonstandard form C778 and asks whether it is aligned on the line printer. After the operator responds Y, the output is printed. #/*SIGNOFF #RJEND END OF SUBSYSTEM At the HP 3000 terminal: :ALTSPOOLFILE #0195;OUTPRI=2 IO/20:26/14/STANDARD FORMS ?IO/20:26/14/SP#6/ IS #S101;LP ON LDEV#6 (Y/N) =REPLY 14,Y Finally, in order to retrieve the output destined for the standard form (the output that was deferred earlier), the terminal operator alters the file's priority and replies to the subsequent prompt for device assignment. The following is an example of a FORTRAN program using multiple forms. //JOBNAME JOB '9876 543210','AUSER',CLASS=R // EXEC FORTGCLG //STP1.SYSIN DD * C OUTPUT TO THE FIRST FORM C DO 50 I=1,5 50 WRITE (6,900) I,I,I,I 900 FORMAT (218,10X,'OUTPUT TO FIRST FORM',10X,2I8) C DO 100 I=1,5 DO 100 J=111111,1111110,111111 K=J-111111 100 WRITE (6,1000) K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K 1000 FORMAT (1H,20I6) C DO 150 i=1,5 150 WRITE (6,900)I,I,I,I C C OUTPUT TO A SECOND FORM C DO 200 I=1,5 200 WRITE (7,1010) I,I,I,I 1010 FORMAT (2I8,10X,'OUTPUT TO FORM NUMBER TWO',10X,2I8) C DO 300 I=1,100 300 WRITE (7,1030)I,I,I,I,I,I,I,I,I,I 1030 FORMAT (10I10) C DO 400 I=1,5 400 WRITE (7,1010) C C OUTPUT TO A THIRD FORM C DO 500 I=1,5 500 WRITE (3,1040)I,I,I,I 1040 FORMAT (2I8,10X,'OUTPUT TO THIRD FORM',10X,2I8) C DO 600 I=1,100 600 WRITE (3,1030)I,I,I,I,I,I,I,I,I,I C DO 700 I=1,5 700 WRITE (3,1040)I,I,I,I C STOP END /* //STP3.FT03F001 DD SYSOUT=(C,,C333), // DCB=(RECFM=UA,BLKSIZE=133,LRECL=133) //STP3.FT07F001 DD SYSOUT=(C,,C777), // DCB=(RECFM=UA,BLKSIZE=133,LRECL=133) // At the end of this example, the STP3 file equations specify nonstandard forms C333 and C777. Example 8: #RJOUT is Repeated One interactive session communicates with an IBM host and repeats its #RJOUT command. The commands are entered from a user's terminal. :FILE LP;DEV=PRINTER This defines file 'LP' as any member of device class 'PRINTER'. The device class must have been configured in MPE. :RJE This invokes RJE with the command, input, list, and punch files at their default values. #RJLINE 3780;DEV=RJE30 The line is defined within the subsystem as an IBM 3780 emulator. RJE/XL will search for linkname "RJE30" in NMCONFIG.PUB.SYS. RJE/V will open the first available communications device in device class "RJE30". Defaults are used for the other parameters. #RJIN SIGNON #RJEOD The disk file 'SIGNON' in the logon group and account are used to log onto the remote host system. Completion of the transmission of the sign on card image is completed by using the subsystem command RJEOD. The output buffer and an EOT are sent to the remote processor. #RJOUT *LP;WAIT=0;REPEAT=YES This subsystem command identifies file LP as the output destination, sets an indefinite wait time and gives the RJE user the ability to continuously process output received from the host system. [CTRL]-Y Use of a [CTRL]-Y terminates the current subsystem command.
NOTE See Chapter 5, "Using RJE in Programmatic Mode."


MPE/iX 5.0 Documentation