Write data to a smart large object

To write data to the sbspace of a smart large object, use either the mi_lo_write() function or the mi_lo_writewithseek() function.

The mi_lo_write() function begins the write operation at the current LO seek position. You can obtain the current LO seek position with the mi_lo_tell() function, or you can set the LO seek position with the mi_lo_seek() function.

The mi_lo_writewithseek() function performs the seek and write operations with a single function call. You specify the seek position at which to begin the write operation as arguments to mi_lo_writewithseek().

These functions both write a specified number of bytes from a user-defined character buffer to the open smart large object that an LO file descriptor identifies. The smart-large-object optimizer determines the default extent size for the smart large object based on the amount of data that you write. Therefore, try to maximum the amount of data you write in a single call to mi_lo_write() or mi_lo_writewithseek().
Important: An attempt to write data to an sbspace that does not exist results in an error.
In addition to a write operation, you might also need to perform the following operations on the open smart large object.
Task Smart-large-object function More information
Read data from the sbspace mi_lo_read(), mi_lo_readwithseek() Read data from a smart large object
Obtain the LO seek position mi_lo_tell() Read data from a smart large object
Obtain status information mi_lo_stat() Obtain status information
Obtain storage characteristics mi_lo_stat_cspec() Obtaining storage characteristics