“Writetext Bulk” requests

The text of a “writetext bulk” language request looks like this:

writetext bulk dbname.tblname.colname textptr [timestamp=timestamp] [with log] 

where the timestamp and logging indicator are optional.

In response, the SRV_LANGUAGE event handler should:

  1. Record the bulk type internally by calling srv_thread_props with cmd set to CS_SET, property set to SRV_T_BULKTYPE, and bufp pointing to a value of SRV_TEXTLOAD, SRV_IMAGELOAD, or SRV_UNITEXTLOAD.

  2. Continue parsing to extract the object name, which is generally of the form “dbname.tblname.colname”. This name can then be stored in the name and namelen fields of a CS_IODESC structure, which can later be used in the SRV_BULK event handler as an argument to ct_data_info, if the data stream is being passed on to a server in a gateway application.

  3. Continue parsing to extract the text pointer, which will appear as a large hexadecimal number. Once converted from a character string to an actual CS_BINARY value, the text pointer and its length are stored in the textptr and textptrlen fields of the CS_IODESC structure.

  4. Continue parsing to extract the timestamp, which, if present, will appear as “timestamp = large_hexadecimal_number”. Once converted from a character string to an actual CS_BINARY value, the timestamp and its length can be stored in the timestamp and timestamplen fields of the CS_IODESC structure.

  5. Finally, parse to extract the logging indicator, which, if present, will appear as “with log”. If this indicator is present, the log_on_update field of the CS_IODESC structure should be set to CS_TRUE.