The Open Server data processing model

In Open Server, three routines work together to retrieve parameter data and formats from a client and to send row data, and return parameters and their formats to a client. These routines are srv_descfmt, srv_bind, and srv_xferdata.

An application uses these routines to process any client command that provides parameters or requests results. RPC commands, language commands, cursor commands, dynamic SQL commands, message commands, and negotiated login commands fall into this category.

Each of the three routines takes a type argument, which indicates the type of data being described, bound, or transferred. For example, type would be set to SRV_CURDATA when describing the format of cursor command input parameters, whereas type would be set to SRV_ROWDATA when processing result rows. For a list of legal type values, see each routine’s reference page in Chapter 3.

All three routines take a cmd argument as well, which indicates the direction of data flow. A value of CS_GET instructs the Open Server application to retrieve information from the client, while CS_SET instructs the application to return results to a client.

An application can use these routines to: