SA_RepositFile


 

SA_RepositFile positions the file to a given byte position or record number.

int SA_RepositFile ( SA_FH TxtFH, u32 position, u32 posMode );

or

int SA_RepositFile32 ( SA_FH TxtFH, u32 position, u32 posMode );

Parameters:
TxtFH
The handle of the previously opened or prepared text file.
position
The byte or record number.
posMode
An indicator of the type of information to be returned.

Note the following:

  1. Valid {posmode} values are as follows:

  2.  

    Value

    Returns the ...

    0

    current byte position in the file.

    1

    beginning byte position of the current record.

    2

    current record number if the file is opend in SA_Fixed mode. Otherwise, same as mode 1.

     

  3. Function return codes are as follows:

  4.  

    Value

    Meaning

    1

    Success.

    0

    Attempt to position beyond end of file.

    -nn

    Error as described in Sunaccess Errors

     

  5. Use SA_RepositFile32 for 32 bit applications such as Visual Basic 6.0.

 



Sunaccess Reference SA_Rename SA_Sort