Log bulk insert [EBF 4.2.4]

With version 4.2.4, ECRTP provides a Windows feature, log bulk insert, that improves performance when using an ODBC database for the log, TRLOG. With this feature, ECRTP writes multiple log records at one time, instead of writing them one at a time, as was done prior to this enhancement.

An environment variable, TRLOG_BLKSIZE, allows users to specify the maximum number of records to be inserted into the TRLOG database at one time. The allowable range is 0 to 500 records. The default value is 100.

ECRTP automatically detects if the TRLOG database supports bulk inserts. If the TRLOG database does not support bulk inserts or if the TRLOG_BLOCKSIZE environment variable is set to 0 or 1, the program inserts records into TRLOG one at a time, as it does in EDI 4.2.3 and earlier releases.

If ECRTP cannot get sufficient memory for the bulk insert at the specified block size, it retries the insert with a block size of 50. If there is insufficient memory for the bulk inserts at a block size of 50, ECRTP inserts records one at a time.

In addition, with version 4.2.4, a transNNN.log file is written to disk if either the single TRLOG insert fails or the bulk insert fails. The transNNN.log file is a dump of the LOG records that were buffered in memory but could not be written to the ODBC TRLOG table.

The transNNN.log file is stored in one of the following directories:

If the insert to the ODBC TRLOG table fails, and the transNNN.log file is written to disk, the following error message is written to the TRACE file, TRNNN.DAT.

(1042) FATAL: Failed To Write TRLOG - dumping log to full path directory\transNNN.log

See Chapter 2, “Running ECRTP,” of the ECRTP Reference Guide for information about other ECRTP environment variables, and for the short and expanded formats for writing log records to disk. The expanded format matches the record layout of the TRLOG table.