HP 3000 Manuals

Specifying User-Written Procedures in Commands [ RJE User/Programmer Reference Manual ] MPE/iX 5.0 Documentation


RJE User/Programmer Reference Manual

Specifying User-Written Procedures in Commands 

A user procedure is specified in an RJE command line as follows:

     @procedurename [{(G)}
                     {(P)}
                     {(S)}]

RJE loads procedurename using the MPE LOADPROC intrinsic.  The G, P, and
S parameters are the equivalent of the 2, 1, and 0 lib parameters,
respectively, of the LOADPROC intrinsic.

To designate the user-written procedure and the SL file containing it,
precede the actual name of the procedure, procedurename, with an @,
followed optionally by a letter in parentheses indicating the SL file
search order.  When G is specified, the procedurename procedure is
searched for in the following order of segmented library files:

   1.  Logon group SL

   2.  SL.PUB in the logon account

   3.  SL.PUB.SYS

When P is specified, the procedurename procedure is searched for in the
following order of segmented library files:

   1.  SL.PUB in the logon account

   2.  SL.PUB.SYS

When S or no parameter is specified, the procedurename procedure is
searched for in the SL.PUB.SYS segmented library file.

The RJE Procedural Interface 

All user-written procedures can be coded for execution in compatibility
mode (SPL) or in native mode with defined compatibility mode switch
stubs.  The formal procedure specifications are shown for each of the RJE
procedure supported commands.  In addition to the formal specifications,
RJE provides ten locations of global storage, at DB+0 through DB+9.
These ten locations are initialized to zero by RJE. User-written
procedures declare variables in this area with statements similar to the
following:

INTEGER MY'OWN'GLOBAL'0 = DB+0;

LOGICAL MY'OWN'GLOBAL'9 = DB+9;

INTEGER ARRAY PROCGLOB(*) = DB+0;


CAUTION The user must always be aware that only ten locations are available for GLOBAL area.

CAUTION This GLOBAL area is shared among all user-written procedures defined within a RJE process. The user must insure against data conflicts between procedures.

CAUTION When a user-written procedure either attempts to expand the locked stack or uses a significant amount of data stack space (for instance, arrays local to the procedure), it may be necessary to specify additional stack space. If RJE executes with its stack locked, where LOCK=NO is not specified in the #RJLINE command and the stack overflows, a system abort will occur. To prevent this from occurring: * Use the LOCK=NO option in the #RJLINE command. (Performance of RJE may be degraded.) * Increase the stack and/or data size of the RJE process. This can be accomplished by invoking RJE with the MPE RUN command using the STACK and MAXDATA parameter. Performance in other processes may be degraded. (See Appendix B for more information on using the RUN command to invoke RJE.) * Request the system manager to increase the value in the RJE subsystem STACK parameter. This will necessitate" that the RJE software be reinstalled. Also, performance in other processes may be degraded.


MPE/iX 5.0 Documentation