Understanding Special Operations

In addition to the basic and advanced operations available on the Insert TableIO Operation form, there are two special operations:

  • Flush Insert Buffer

    To maintain data integrity, you should flush the insert buffer before you perform any operations other than an insert. If you fail to do so, the results of recent inserts might not be reflected in other operations, and the operations might not work properly.

    When you use the flush insert buffer option for a specific table, you must flush the buffer before you close the table.

  • Get Error Data

    To retrieve errors for records that the system did not insert properly, use the Get Error Data option. Depending on when the buffers are flushed, or when you begin another insert, you might overwrite the error information for a specific insert. If error information is critical, retrieve the information before the next insert begins.

    If you need to perform special error handling, set the error handling up after each table I/O insert and each Flush Insert Buffer option. Always retrieve the error information before you begin the next table operation.

    Note: The return code of each table I/O statement is stored in system variable SV File_IO_Status. If an Insert or Flush Insert Buffer operation failed, the SV File_IO_Status system variable might contain a value of CO ERROR_DETAILS_AVAILABLE. If so, you need to run the Get Error Data table I/O special operation to retrieve the error data. The Get Error Data operation returns the values used in the insert for all the requested columns.