HP 3000 Manuals

More About Using RJE Files [ RJE User/Programmer Reference Manual ] MPE/iX 5.0 Documentation


RJE User/Programmer Reference Manual

More About Using RJE Files 

The following section includes additional information that you may need
to know about using RJE files.

Command Files 

Command files are unnumbered files which may contain subsystem commands
only.  A command file cannot contain input data unless the :RJE command
specifies it as being both the command file and input file.  If an
end-of-file or an error is encountered on the command file, and the
command file was not $STDINX, the file is closed and $STDINX is opened as
the command file.  Additionally, if the current input file is the same
device as $STDINX, the input file is closed and the command and input
files are accessed as the same file.  If an end-of-file or an error
occurs while opening $STDINX, RJE terminates.

Input Files 

When the default input file is used (by executing an #RJIN command with
no input device or file specification), if the REC parameter is not
specified, the file is closed when the #RJIN operation ends.  The default
input file is then set equal to the command file.  If the REC parameter
is specified, the default input file is left open.

List, Output, and Statistic Files 

 *  If the FOPEN of a user-specified old file fails, then an attempt is
    made to open the file as a new file.  RJE may open the file with
    characteristics that you do not want, such as carriage control.  In
    this case, it is recommended that you specify a file equation with
    the file characteristics that you desire.

 *  Output will be written to the default list file (the file opened from
    the :RJE command) under the following conditions:

     *  #RJLIST is processed with no file, device, or list procedure
        specified and unrouted output or routed list output is received.

     *  #RJOUT is processed, with no file, device, or output procedure
        specified and unrouted output or routed list output is received.
        The default list file is closed when RJE terminates.

 *  Output will be written to the list file specified in #RJLIST if
    unrouted output or routed list output is received.  If an output file
    is specified in #RJOUT, any routed or unrouted received data will be
    written to it.  Note that there is no default output file opened on
    the :RJE command; an output file is opened only when specified in the
    #RJOUT command.  List and output files specified in the #RJLIST and
    #RJOUT commands are closed when the command completes processing.

 *  The value of the control parameter passed to FWRITE for list and
    output files depends on the received data.  In the case of list files
    specified in #RJLIST it depends on the specifications of the AUTOPAGE
    parameter.  If received data is nontransparent and the first byte
    of a received logical record is an [ESC] character (%33 if
    LINECODE=ASCII, %47 if LINECODE=EBCDIC), then the following byte is
    used to determine vertical forms control; otherwise vertical forms
    control is not determined by received data.  The following table
    summarizes the conversions used for vertical forms control, according
    to emulation type and LINECODE.

          Table B-1.  Vertical Forms Control Code Conversions 

---------------------------------------------------------------------------------------------
|                                                                                           |
| Function              IBM 2780          IBM 3780      HP 3000           (AUTOPAGE=YES)    |
|                     ASCII EBCDIC      ASCII EBCDIC    Control                             |
|                                                                                           |
---------------------------------------------------------------------------------------------
|                                                                                           |
| Single Space      Q        /        Q        /        %201              (%40)             |
|                                                                                           |
| Double Space      R        S        R        S        %202              (%60)             |
|                                                                                           |
| Triple Space      S        T        S        T        %203              (%304)            |
|                                                                                           |
| Skip to 1         A        A        A        A        %300                                |
|                                                                                           |
| Skip to 2         B        B        B        B        %301                                |
|                                                                                           |
| Skip to 3         C        C        C        C        %302              See note.         |
|                                                                                           |
| Skip to 4         D        D        D        D        %303                                |
|                                                                                           |
| Skip to 5         E        E        E        E        %304                                |
|                                                                                           |
| Skip to 6         F        F        F        F        %305                                |
|                                                                                           |
| Skip to 7         G        G        G        G        %306                                |
|                                                                                           |
| Skip to 8         H        H        H        H        %307                                |
|                                                                                           |
| Skip to 9                           I        I        %310                                |
|                                                                                           |
| Skip to 10                          J        J        %311                                |
|                                                                                           |
| Skip to 11                          K        K        %312                                |
|                                                                                           |
| Skip to 12                          L        L        %313                                |
|                                                                                           |
| Suppress Space                      M        M        %53                                 |
|                                                                                           |
| Note:  If CHNL3=n is specified, the value n+%277 is used.                                 |
|                                                                                           |
---------------------------------------------------------------------------------------------

If vertical forms control codes are not present in received data,then a
value of %40 is used.  If AUTOPAGE=NO is specified, %201 is used.  This
is the only case where omitting the AUTOPAGE parameter is equivalent to
AUTOPAGE=YES. When vertical forms control is determined by received data,
omitting the AUTOPAGE parameter is equivalent to AUTOPAGE=NO. If offline
listing is being performed (the SOURCE parameter of #RJLIST has been
specified), then the control parameter used for FWRITE is 0.  If the
SOURCE file FOPTIONS specifies carriage control option, the control
parameter is 1.

For additional discussion on carriage control codes and the FWRITE
intrinsic, refer to the MPE Intrinsics Reference Manual.

Punch File 

 *  Output will be written to the default punch file (the file opened on
    the :RJE command) only if routed punch data is received while
    processing #RJOUT with no file, device, or punch procedure specified.
    The default punch file is closed when RJE terminates.

 *  If the FOPEN of a user-specified old file fails, then an attempt is
    made to open the file as new.

 *  Output will be written to the punch file specified in #RJPUNCH if
    unrouted output or routed punch output is received.  Punch files
    specified in the #RJPUNCH command are closed when the command
    completes processing.

 *  Punch files are generally expected to have a file code of 1060
    (decimal).  If $OLDPASS exists, but has a file code other than 1060,
    $NEWPASS is opened with a file code of 1060 and used.  If you specify
    a punch file in the :RJE or #RJPUNCH commands, it may have any file
    code if it is an OLD file; if it is not OLD, RJE will open a NEW file
    with the specified name and with a file code of 1060.  When you use a
    :LISTF,1 or :LISTF,2 command in MPE the file code value of 1060 is
    displayed as RJEPN.


NOTE #RJOUT will only build a new file as a punch file if it is the default punch file. #RJPUNCH always builds a new file as the punch file.
Message File A message file is specified in the MSGFILE parameter of the #RJLINE command. Use of this parameter will cause RJE to look for command files submitted by users for processing. A user must have an OP capability to be able to specify this parameter. Each record of the message file is interpreted as an actual file designator for a command file containing subsystem commands to be processed by RJE. The message file acts as a first-in-first-out (FIFO) queue of command file names. RJE does destructive read operations from the front of the message file to secure a record and users append records to the end of the message file. The message file designated in the MSGFILE parameter of an #RJLINE command must be built as a permanent disk file in the group and account MSG.RJE before it is identified. A message file needs to be able to contain file names with lockwords and to be of sufficient size to accomodate the demands of the users of the system. To build a message file, use an MPE command similar to the following example: :BUILD {message file name};REC=80,1,V,ASCII;MSG;DISC=100 The size of this file and the allocation of disk space is controlled by the DISC parameter of the BUILD command. See the MPE Commands Reference Manual. The FCOPY subsystem may be used (with discretion) to append records to a message file.
CAUTION Do not read a message file. You will destroy its contents as you read it.
When you write your own procedure to append command file names as records to a message file, use the following conventions for the standard HP file system intrinsics FOPEN, FWRITE and FCLOSE: fnum:=FOPEN(filename,%32105,%1203); FWRITE(fnum,text,tsize,0); FCLOSE(fnum,1,0}; Refer to Chapter 5 and Appendix E for examples using FWRITE to append records to a message file.


MPE/iX 5.0 Documentation