SE_log_combine

Combines two log files 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 log file; may be a user name file name
logfile2 The name of the second input log file; may be a user name file name
logfile12 The name of the output log file; the name must be a simple log file name that cannot include a user name.
operation The Boolean operation to perform
Description

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

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

The four operations supported between log files are:

SE_LOG_INTERSECT

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

SE_LOG_UNION

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

SE_LOG_DIFFERENCE

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

SE_LOG_SYMDIFF

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

Returns

If successful, the number of rows in the new log file 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 log file is a temporary log file sorted in ascending order. Change it to a persistent log file with SE_log_set_type. The input log files must not be opened.