SA_IsiWrite


 

SA_IsiWrite writes additional text records to an existing text file. Information in the key parameter is written to the index key file.

int SA_IsiWrite ( SA_FH IsiFH, u8 *Buffer, u32 BufLen, u8 *Key, u32 KeyLen );

Parameters:
IsiFH
The handle of the previously opened or prepared ISAM file.
Buffer
The buffer written by the operation.
BufLen
The length of the {Buffer}.
Key
The key that must match to qualify this record on subsequent read operations.
KeyLen
The length of the {Key}.

Note the following:

  1. Any record with a complete end of line sequence, CR/LF for DOS or LF for Linux, will lose all text in the record after that sequence on a subsequent record retrieval.

  2. A record longer than the {RecLen} parameter specified in SA_IsiPrep will be truncated.

  3. The text in {Key} should match the corresponding positions in {Buffer} that were defined for the key information. If the key positions were defined as '21-25,3-7', positions 1-5 of {key} should match positions 21-25 of {buffer} and positions 6-10 of {Key} should match positions 3-7 of buffer. If they do not match, the record will not be retrievable with this key after the file has been re-indexed with the SUNINDEX utility.

  4. Function return codes are as follows:

  5.  

    Value

    Meaning

    nn

    Number of bytes written

    -nn

    Error as described in Sunaccess Errors

     



Sunaccess Reference SA_ISIReadKey SA_IsiUpdate