##RJSTAT Procedural Interface [ RJE User/Programmer Reference Manual ] MPE/iX 5.0 Documentation
RJE User/Programmer Reference Manual
#RJSTAT Procedural Interface
The statistic file reference may be to a user-supplied compatibility mode
(CM) procedure that must conform to the following formal declaration:
PROCEDURE procedurename(target,count)
VALUE count;
INTEGER count;
ARRAY target;
RJE moves a statistic file record into the array target and calls
procedurename. The statistic file record put in target is a line from
the RJE Performance Statistics display as represented in figure 3-1 in
Chapter 3, "RJE User Commands." Each line of the display is passed one
line at a time to the procedurename in target. The user-written
procedure must identify and isolate the information supplied in target.
The size of the array target, a negative byte count, is passed by value
as count in the procedure call. Your procedure then processes the
statistic file record and returns to RJE. Carriage control is in the HP
format and is accessible from within the procedure at location Q-6. Your
procedure can specify a LOGICAL CCTL= Q-6 to access and process the
carriage control information. Once all statistic file records have been
processed, RJE ceases to call the procedure.
Writing to a Message File from a User-Written Procedure
The last example in Chapter 5, "Using RJE in Programmatic Mode," shows a
procedure that performs this function. The following conventions are
recommended when writing to a message file with an SPL procedure.
Opening a Message File
To open the file:
filenumber := FOPEN (mfa,%32105,%2203).
filenumber is returned by the FOPEN intrinsic.
mfa is a byte array containing message file name.
The value %32105 for foption means: no FILE command allowed, nonlabeled
tapes, no CCTL, variable length records, the default designator is the
file name, ASCII, old permanent file.
The value %2203 for aoption means: native mode access(destructive
reads), no-wait I/O prohibited, inter- job-multi-access allowed,
buffering allowed, semi-exclusive access, dynamic locking prohibited,
single logical record access and append access. %1203 may be used in
place of %2203, but the latter is preferred.
Writing to a Message File
To write to the file:
FWRITE (filenumber,text,tsize,0);
The parameter filenumber identifies the message file which was opened.
The array text contains the name of the command file which is to be
written to the message file, as identified by filenumber.
The variable tsize is the length of text to be written. If this is a
negative number the unit of length is characters; if positive the unit is
words.
For RJE/XL, the FOPEN, FWRITE, and FCLOSE procedures can also be called
with native-mode programs.
Closing a Message File
To close the message file:
FCLOSE (filenumber, 1,0) ;
Refer to the MPE Intrinsics Reference Manual for a detailed description
of how to use these intrinsics.
MPE/iX 5.0 Documentation