CS_IODESC structure

The CS_IODESC structure describes text or image data and is used to pass information between a Server Option application and the API functions that process this data.

The general structure for a CS_IODESC, regardless of programming language, is shown in Table 6.

Table 6: CS_IODESC structure

This field

Contains this information

IOTYPE

Indicates the type of input or output to perform. For text and image operations, IOTYPE always has the value CS_IODATA.

DATATYPE

The datatype of the data object. The only legal values for DATATYPE are TDSTEXT and TDSIMAGE.

LOCALE

Not used in the Server Option. Set this to NULL.

USERTYPE

Not used in the Server Option.

TOTAL_TXTLEN

In bytes, the total length of the text or image value.

OFFSET

Reserved for future use.

LOG_ON_UPDATE

Determines whether the update to this text or image value should be logged. This field is not used by the Server Option.

NAME

The name of the text or image column.

NAMELEN

In bytes, the length of NAME.

TIMESTAMP

The text timestamp of the column. A text timestamp marks the time of the last modification to a text or image column.

TIMESTAMPLEN

Not used by the Server Option.

TEXTPTR

A text pointer to a table row ID.

TEXTPTRLEN

In bytes, the length of TEXTPTR. This length is currently set at 16.

The CS_IODESC structure is defined in the SYGWCOB copy book for COBOL (under the name CS-IODESC) and in the SYGWPLI INCLUDE member for PL/1.

When receiving text or image data from a client application, a Server Option application invokes the TDINFTXT function with the ACTION parameter set to TDS_GET. The Server Option application must provide the correct text or image DATATYPE field value before TDINFTXT is invoked so that the Server Option can translate incoming text data. Only the value of the TOTAL_TXTLEN field is provided by TDINFTXT here.

When sending text or image data to a client application, the Server Option application also invokes the TDINFTXT function with the ACTION parameter set to TDS_SET. The Server Option application must describe the text or image data to be sent to the client by providing values for the appropriate CS_IODESC fields before TDINFTXT is invoked.