SA_GetFilePosit


 

SA_GetFilePosit returns the current position in the file.

int SA_GetFilePosit ( SA_FH TxtFH, u32 posMode );

or

int SA_GetFilePosit32 ( SA_FH TxtFH, u32 posMode );

Parameters:
TxtFH
The handle of the previously opened or prepared text file.
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

    +nn

    Success - position returned.

    -nn

    Error as described in Sunaccess Errors

     

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

 



Sunaccess Reference SA_GetErrorSubCode SA_Index