Open Server usage

This section discusses how Open Server must be set up to support partial updates.


sp_mda

sp_mda is a stored procedure that retrieves metadata from the server. To support partial updates, your Open Server application must define an sp_mda stored procedure and specify the updatetext syntax that an Open Client application must use.

An Open Client application must invoke sp_mda using these parameters and values:

Parameter

Value

Description

clienttype

5

5 indicates that the client is Client-Library.

mdaversion

1

clientversion

0

clientversion is an optional parameter that indicates the client version. The default is 0.

If the server supports partial updates, sp_mda returns:

Parameter

Value

mdinfo

“UPDATETEXT”

querytype

2

query

updatetext_syntax

Example:

updatetext ? ? ? {NULL | ?} {NULL | ?}

where “?” indicates the updatetext parameters.

For more information about the sp_mda stored procedure, see the Mainframe Connect™ DB2 UDB Options for IBM CICS and IMS Installation and Administration Guide. For a sample implementation of sp_mda, see $SYBASE/$SYBASE_OCS/sample/srvlibrary/updtext.c.


SRV_T_BULKTYPE

To correctly retrieve the partially updated data sent by the client, the Open Server application must set SRV_T_BULKTYPE to SRV_TEXTLOAD, SRV_UNITEXTLOAD, or SRV_IMAGELOAD. For more information about SRV_T_BULKTYPE, see the Open Server Server-Library/C Reference Manual.


Handlers

The SRV_LANGUAGE and SRV_BULK handlers have to be installed in Open Server. Open Server uses SRV_LANGUAGE to receive the updatetext statement from the Client-Library. SRV_BULK, on the other hand, receives the data sent through ct_send_data().

For more information about SRV_LANGUAGE and SRV_BULK, see the Open Client and Open Server Common Libraries Reference Manual and the Open Server Server-Library/C Reference Manual.