$UpdStat

From m204wiki
Revision as of 17:54, 31 July 2014 by Mlarocca (talk | contribs) (Mlarocca moved page $UPDSTAT to $UpdStat: Lower case change)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The $UPDSTAT function is used in conjunction with the ON FIELD CONSTRAINT CONFLICT unit and field attributes which have field-level constraints (UNIQUE and AT-MOST-ONE). You must use $UPDSTAT in the ON FCC unit when writing procedures for files which have (or might have in the future) more than one type of field-level constraint defined. The $UPDSTAT function takes no arguments.

If $UPDSTAT is invoked from an ON FCC unit following the detection of a field-level constraint conflict, it returns a numeric value denoting the type of conflict that has occurred:

Value Meaning
0 No violation occurred
1 A uniqueness violation occurred
2 An AT-MOST-ONE violation has occurred