SA_TxtPrep


 

A file must be created or opened prior to any attempt to process data against it. SA_TxtPrep creates a new data file. If the specified data file exists, it will be deleted prior to creating the new file.

SA_FH SA_TxtPrep ( char *TxtName, u32 TxtNameLen, u32 OpenMode, u32 DiskOpSize );

Parameters:
TxtName
The file name of the text file to create.
TxtNameLen
The length of {TxtName}.
OpenMode
A valid file access mode.
DiskOpSize
The sector size and record size for random I/O.

Note the following:

  1. Upon success of the function, the open file handle is returned.

  2. There is no implied close of an open file. If a file is opened and the file handle is used again in a subsequent open or prepare, the first file will remain open for the duration of the program.

  3. The maximum record length supported is:

    32,767 - 1 - sizeLEOR

  4. Function return codes are as follows:

  5.  

    Value

    Meaning

    +nn

    Success (file handle)

    -nn

    Error as described in Sunaccess Errors

     

     



Sunaccess Reference SA_TxtOpen