CONNX Remote Procedures

A CONNX Remote Procedure is a VMS program or function with which the client computer communicates. The CONNX server, running on the VMS system, passes messages, known as remote procedure calls (RPC), back and forth between the computer application and the VMS-based remote procedure. Since applications can vary widely in functionality, the CONNX server is able to pass the messages without regard to content or format. It is up to the application programmer to ensure both the computer and VMS programs are working within the same message format and structure.

CONNX comes with two sample RPC stubs: RPC_BAS, written in VAX BASIC, and RPC_CPP.RPC, written in DEC C++. They can be found in the directory into which CONNX is installed on the VMS system and are described in the following table:

 

C syntax example:

long rpc (char * lpszRPCName, int nSendLength, char * lpszSendBuff, int  nReceiveLength, char *  lpszReceiveBuff, int nLog)

 

C Syntax Example Parameters and Description

Parameter

Description

IpszRCPName

Name of the VAX procedure with which to communicate. Maximum length is 16 characters.

NSendLength

Length of IpszSendBuff.

IpszSendBuff

Message to be transmitted to the VAX>

NReceiveLength

Length of IpszReceiveBuff.

IpszReceiveBuff

Message received from the VAX. This butter must be one byte longer than nReceiveLength.

NLog

Flag that determines if detailed logging message should be sent to standard output (printf).

 

RPC is a function that returns a long integer representing the status of the function as its value. Unless otherwise altered within the RPC, a success status of 1 is assumed. This status is passed back to the computer as the value of the computer's RPC function. While any value may be assigned, note that only actual VMS status codes may be translated via the vmsstatus function. Consequently, it is recommended that VMS status codes be assigned as the value of the RPC function.

A remote procedure is invoked by the computer via the RPC function available in the CONNX OLE Server.

Related Topic

image\CHICLET.jpg To build a remote procedure