The following is an overview of the steps you need to follow when
writing servers for MVSSERV. Subsequent chapters
of the document give further details.
- Select or create a load module data set to contain the executable
code for the server and initialization/termination program. If the
server and initialization/termination program are in different load
modules, the initialization/termination program must load the server
(see Designing and Writing a Server Initialization/Termination Program for details).
- Write the server (see Designing and Writing a Server).
- The server must:
- Access the service request input in the CPRB.
- Call the requested service function.
- Perform the service, calling other servers if necessary.
- Indicate the reply length in the CPRB.
- Set the return code in register 15.
- Return control to MVSSERV.
- Provide recovery (optional).
- Compile or assemble the server and link it to a load module.
- Write an initialization/termination program (see Designing and Writing a Server Initialization/Termination Program).
- For initialization, the program must:
- Load the server (if necessary).
- Obtain resources (if necessary).
- Define the server to MVSSERV and pass a parameter list (parmlist)
pointing to any resources.
- For termination, the program must:
- Free any resources.
- Delete the server (if loaded).
- Compile or assemble the initialization/termination program and
link it to a load module.
- Install the server and initialization/termination program (see Installing Programs and Data Sets for Use with MVSSERV).
- Install the programs in a STEPLIB or system library.
- Define the initialization/termination program to MVSSERV in the
input parameter data set.
- Allocate diagnosis data sets (optional):
- Trace data set
- Dump data set
- Dump suppression data set
- Invoke MVSSERV to test your server (see Testing and Diagnosis).