SE_log_combine

Combines two logfiles with a Boolean operation.

Usage syntax

LONG SE_log_combine (SE_CONNECTION connection, const CHAR *logfile1, const CHAR *logfile2, const CHAR *logfile12, LONG operation);

Parameters
connection The connection handle
logfile1 The name of the first input logfile. May be a username filename.
logfile2 The name of the second input logfile. May be a username filename.
logfile12 The name of the output logfile. The name must be a simple logfile name that cannot include a username.
operation The Boolean operation to perform
Description

SE_log_combine performs a Boolean set operation on a pair of input logfiles, producing a third output logfile. The output logfile can be one of the input logfiles.

If the output logfile is one of the input logfiles, it will be overwritten. If the output logfile is not one of the input logfiles and if it already exists, the SE_LOG_EXISTS (-252) error is returned; otherwise, a new logfile will be created. If SE_log_combine is successful, it returns the number of rows in the new logfile.

The four operations supported between logfiles are:

SE_LOG_INTERSECT

All row IDs present in both input logfiles are copied to the output logfile. Those row IDs present in only one logfile are discarded. This  is a Boolean AND operation.

SE_LOG_UNION

All row IDs present in either input logfiles are copied to the output logfile. Duplicate rows appear only once in the output logfile. This is a Boolean OR operation.

SE_LOG_DIFFERENCE

All rows present in the first logfile but not in the second logfile are copied to the output logfile. This is a Boolean INHIBITION operation.

SE_LOG_SYMDIFF

All rows present in either of the input logfiles, but not present in both, are copied to the output logfile. This is a Boolean XOR operation.

Returns

If successful, the number of rows in the new logfile is returned.  If  unsuccessful one of the following is returned:


SE_FAILURE

SE_INVALID_PARAM_VALUE

SE_INVALID_POINTER

SE_LOG_IO_ERROR

SE_LOG_NOEXIST

SE_LOG_NOACCESS

SE_LOG_NOTOPEN

SE_NET_FAILURE

SE_OUT_OF_SVMEM

SE_SDE_NOT_STARTED

SE_TEMP_IO_ERROR

Notes

• The output logfile is a temporary logfile sorted in ascending order. Change it to a persistent logfile with SE_log_set_type. The input logfiles must not be opened.