SPDSAUNQ Macro Variable

Specifies whether to cancel an append or insert to a table. Use this macro variable if the table has a unique index and the new rows would violate the index uniqueness.

Valid in: SPD Server
Default: NO
Restriction: Assignments for macro variables with character input (for example, YES | NO | BINARY arguments) must be entered in uppercase (capitalized).
Tip: Use the UNIQUESAVE table option (or SPDSUSAV macro variable) to save rejected rows when SPDSAUNC=NO.

Syntax

SPDSAUNQ=YES | NO

Required Arguments

YES

cancels the Append or Insert operation if any duplicate values are found.

NO

performs the Append or Insert operation enforcing uniqueness at the expense of appending unique indexes in row order, one row at a time. Only rows with duplicate values are discarded.

Details

Set SPDSAUNQ=YES to improve append or insert performance to a table with unique indexes. If uniqueness is not maintained, the Append or Insert is canceled and the table is returned to its state before the additions. At this point, you have two choices: remove the duplicates from the table being added and attempt the operation again, or repeat the operation with SPDSAUNQ set to NO. When SPDSAUNQ=NO, set the SPDSUSAV macro variable (or UNIQUESAVE= table option) to YES to save rejected rows.

See Also

SPD Server table options:
Last updated: February 8, 2017