SA_IsiPrep


 

A file must be created or opened prior to any attempt to process data against it. SA_IsiPrep creates a new data file and associated index file. If either the specified data or index file exists, they will be deleted prior to creating the new files.

SA_FH SA_IsiPrep ( char *TxtName, u32 TxtNameLen, char *IsiName, u32 IsiNameLen,
u32
RecLen, char *OptKeyList, u32 OptKeyListLen, u32 OpenMode );

Parameters:
TxtName
The file name of the text file to create.
TxtNameLen
The length of {TxtName}.
IsiName
The file name of the ISAM file to create.
IsiNameLen
The length of {IsiName}.
RecLen
The maximum length of records to be written.
OptKeyList
A list of options and keys.
OpenKeyListLen
The length of {OptKeyList}.
OpenMode
A valid file access mode.

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. Valid options in {optkeylist} are:

  5.  

    Option

    Meaning

    N

    Disallows duplicate keys.

    U

    Specifies non-case sensitive searches.

    W

    Write at end of file.

     

  6. The key field list form is:

    key1start-key1end,...,keyNstart-keyNend

  7. An example {optkeylist} is as follows:

    "D,U,1-14,51-65,17,20"

  8. Single character keys are allowable.

  9. The aggregate key length must not exceed ninety-six (96) characters.

  10. Function return codes are as follows:

  11.  

    Value

    Meaning

    +nn

    Success (file handle).

    -nn

    Error as described in Sunaccess Errors

     

     



Sunaccess Reference SA_IsiOpen