(No title)

# A server in VAX/FORTRAN

The following example is in VAX/FORTRAN. Note the %REF(). See the comments about RPC system data types.

    C       VAX/FORTRAN example of a simple RPC server program

            PROGRAM SERVERLOOP

            INTEGER*4 STATUS
            CHARACTER*40 CLIENT

    C       Attach the server stub to the RPC system:

            CALL ATTACH_FILER

    C       Run a server loop indefinitely unless error occurs:

            CLIENT = 'RPC_CLIENT_NAME'
            CALL RPC_LOOP_SERVER(STATUS,%REF(CLIENT))
            CALL RPC_REPORT_ERROR(STATUS)
            END

_________________________________________________________________