Returns the currently defined events.
Syntax
REPLACE FUNCTION TDWM.TDWMEventStatus (
RequestType VARCHAR(1) CHARACTER SET LATIN
) RETURNS TABLE (
EventId INTEGER,
EventStatus CHAR(1) CHARACTER SET LATIN,
EventActiveDate INTEGER,
EventActiveTime FLOAT,
ExpressionId INTEGER,
ExpressionStatus CHAR(1) CHARACTER SET LATIN,
ExpActiveDate INTEGER,
ExpActiveTime FLOAT,
RecordType VARCHAR(8) CHARACTER SET LATIN,
RecordId INTEGER,
RecordStatus CHAR(1) CHARACTER SET LATIN,
DueToDuration CHAR(1) CHARACTER SET LATIN,
ActiveDate INTEGER,
ActiveTime FLOAT
)
...
;
Syntax Elements
- RequestType
- Request type:
- A= Return all events.
- C = Return current state events.
- EventId
- Internal ID of the Event. A value of zero indicates there is no event for this record entry and there are no events for the Normal SysCon, the Always OpEnv and a State.
- EventStatus
- Current status of the event. The value is either Inactive or Active.
- EventActiveDate
- Date when EventStatus was last changed. This is the date when the EventStatus was set to Inactive or Active.
- EventActiveTime
- Time when EventStatus was last changed. This is the time when EventStatus is set to Inactive or Active.
- ExpressionId
- Internal ID of the Expression. A value of zero indicates there is no expression for this record entry.
- ExpressionStatus
- Current status of the Expression:
- 0 = Inactive
- 1 = Active
- ExpActiveDate
- Date when ExpressionStatus last changed.
- ExpActiveTime
- Time when Expression Status was last changed. This is the time when Expression Status was set to either Active or Inactive.
- RecordType
- Type of record, for example: a SysCon, OpEnv, or Notify Only Expression.
- RecordId
- Internal ID of the SysCon or OpEnv depending on the type of record specified in the RecordType field.
- RecordStatus
- Current status of the SysCon or OpEnv record:
- Y = Active
- N = Inactive
- DueToDuration
- An indicator that the corresponding Syscon is being considered as TRUE or is TRUE:
- 0 = Inactive if the SysCon is TRUE based on the defined expressions.
- 1 = Active if the corresponding SysCon is being considered as TRUE due to the MinDuration value being in affect.
- StateActiveDate
- Date when RecordStatus was last changed.
- StateActiveTime
- Time when RecordStatus was last changed.
Usage Notes
The TDWMEventStatus function provides similar functionality to an EVENT STATUS request. For more information about this interface, see EVENT STATUS.
Example: Using TDWMEventStatus
SELECT * FROM TABLE (TDWM.TDWMEventStatus('c')) AS t1; *** Query completed. 3 rows found. 14 columns returned. *** Total elapsed time was 1 second. EventId 0 EventStatus I EventActiveDate 0 EventActiveTime 0.00000000000000E 000 ExpressionId 0 ExpressionStatus I ExpActiveDate 0 ExpActiveTime 0.00000000000000E 000 RecordType SYSCON RecordId 1 RecordStatus A DueToDuration N ActiveDate 1070518 ActiveTime 8.39380000000000E 004 EventId 0 EventStatus I EventActiveDate 0 EventActiveTime 0.00000000000000E 000 ExpressionId 0 ExpressionStatus I ExpActiveDate 0 ExpActiveTime 0.00000000000000E 000 RecordType OPENV RecordId 1 RecordStatus A DueToDuration N ActiveDate 1070518 ActiveTime 8.39380000000000E 004 EventId 0 EventStatus I EventActiveDate 0 EventActiveTime 0.00000000000000E 000 ExpressionId 0 ExpressionStatus I ExpActiveDate 0 ExpActiveTime 0.00000000000000E 000 RecordType STATE RecordId 1 RecordStatus A DueToDuration N ActiveDate 1070517 ActiveTime 1.00006000000000E 005