Initialisation procedures

On VAX/VMS systems using Pascal, on PILS systems, and on Turbopascal systems, the stub modules are automatically called before the main program is run, and so initialise themselves. The application program need not, therefore, be aware that the modules with which it has been linked are remote. A server loop module which may serve as a main program is available in the run&hyphen.time library. See the example "VAX-VAX over Decnet" later on. Under Turbo Pascal, the user must include a "USES" clause in his program referencing each stub his program uses.

On other target systems, the initialisation procedures must be called explicitly from the application program, as follows.

General Initialisation

Not required for VAX/VMS, TurboPascal, PILS or MoniCa based systems, or the run time library written in C.

If the RPC system is not built into the environment you are using (such as MoniCa or a version RMS68K) it must be initialised by calling RPC_Init (no parameters) before any other RPC routines.

CALL RPC_INIT ! in FORTRAN rpc_init(); /* in C */ rpc_init; { in pascal } rpc_init; -- in ADA

Client Initialisation

In the client, all that is required is that for each server xxx to be used, the procedure OPEN_xxx is called once, before any other calls are made. main() { open_filer(); /* Initialise FILER stub */ ... /* rest of program */ } In Fortran: PROGRAM FRED CALL OPEN_FILER C ... the rest of the client program ... END If you want to explicitly give the rpc address of the server from your program, for instance if you want to handle many servers of the same type, see Section 8.3.2. and the library call RPC_Open.

Server Programs

(This section not required if you are using VMS and want a simple server.)

For the server, a simple main program is required which will first attach the stubs which are available to the run&hyphen.time support, and then call the run&hyphen.time support routines to service any incoming requests. The client stub (left) and the server stub (right) both announce themselves to the Run Time Support library. On the server side, a small main program calls a server loop in the RTS.

See:

If more complex configurations are required, they can be built, as decribed in "varieties of server".