User guide

Writing ENFORM Servers
ENFORM Servers
058058 Tandem Computers Incorporated 7–3
Edit Files
An ENFORM server can be written to read data from an edit file and send the data
to the query processor.
MUMPS
MUMPS data stored in variable-length records cannot be directly processed by
ENFORM. An ENFORM server can be written to read the variable-length records,
restructure the data into fixed-field records, and then send the records to the query
processor to be used with other data. Using an ENFORM server in this manner
combines the convenience and compactness MUMPS provides for data storage
with the querying and report writing facilities of ENFORM.
Some additional potential uses for an ENFORM server are: to convert data from one
format to another and to provide some level of data independence by insulating
applications from changes to the data base.
Writing ENFORM
Servers
ENFORM servers are process files. Rules for process file identification and control are
described in the GUARDIAN Operating System Programmer’s Guide. Syntax and
considerations for relevant procedure calls can be found in the System Procedure Calls
Reference Manual.
The query processor identifies a specific ENFORM server through the server’s process
name. An ENFORM server is identified as a process by calling the process control
procedure LOOKUPPROCESSNAME with the file name. If the server is not a running
named process, the call to LOOKUPROCESSNAME will be unsuccessful.
Servers are created by issuing the Command Interpreter RUN command or by a call to
the NEWPROCESS procedure from a host language. The environment of a server is
determined by the NEWPROCESS parameters and by information specified in the
startup sequence. The NEWPROCESS parameters are used to assign the process
name, to specify the execution priority and the cpu where the new process (an
ENFORM server) executes. In addition, the startup sequence contains the default
volume and subvolume names, and any ASSIGN and PARAM messages regarding the
ENFORM server.
ENFORM Server and Query
Processor Dialogue
Once an ENFORM server is identified and its environment is established, the server
interacts with the query processor through a message dialogue to perform the
following operations:
Read the $RECEIVE file
Interpret startup, open, initiate input, request input, terminate input, and close
messages
Identify and read records from one or more files
Return reply messages and records to the query processor