Re: [U2] Universe triggers (still more)
Bill Haskett <wphaskett <at> advantos.net>
2008-12-01 19:14:00 GMT
Susan:
To expand further on Jeff's comment, the EXECSTAT variable is part of the
CALL arguements list. For instance, in UniData an update trigger might look
like:
001 SUBROUTINE U2.MASTER.TRIGGER.U ( ExecStat, DictFlag, atFILENAME, atID,
atRECORD )
The following table describes each parameter of the syntax.
** Parameter Description
** ---------- --------------------------------------------------------
** trigname The name of the globally cataloged subroutine.
** execstat The execution status returned by the trigger subroutine:
** 0 - No updates are allowed.
** 1 - Updates are allowed.
** 2 - Updates are allowed, using the return recordval.
** dictflag "DICT" - Indicates that the trigger is operating on the
** dictionary file.
** "" - Indicates that the trigger is operating on the
** data file.
** Note: the quotation marks are required.
** filename The name of the file on which the trigger is operating.
** item ID The item ID of the record to be updated.
** recordval The input record value submitted to the UPDATE trigger.
** "recordval" is both an input and output parameter. The
** trigger can change this value (for example, by performing
** a conversion). Then, if the trigger sets execstat to 2,
** this value is passed back in recordval and updates the
** data record. Only strings and numbers are valid.
**
** If the value returned in recordval is invalid, the record
** is not updated, even if the trigger subroutine sets execstat
(Continue reading)