How to code a Dataset trigger where the dataset is updated multiple times before it should be Primed.
search cancel

How to code a Dataset trigger where the dataset is updated multiple times before it should be Primed.

book

Article ID: 55478

calendar_today

Updated On:

Products

ESP Workload Automation

Issue/Introduction

How to code a dataset trigger updated multiple times before it should be primed?

Resolution

COUNT indicates the event is to be scheduled for every n triggers, where n is a number from 0 to 255.
             A value of 0 results in a schedule for each trigger, as does a value of one. It defaults to one.

If dataset 'hlq.TEST1.DATASET' is going to be triggered twice to 'hlq.TEST2.DATASET' being triggered once then code it like 'hlq.TEST1.DATASET' COUNT(2)

A DSTRIG is either primed or not primed. ESP does not stack the number of times a dataset is updated. 

Example:

If hlq.TEST1.DATASET is updated 5 times before hlq.TEST2.DATASET is even updated, ESP does not keep track of the 5 occurrences. It only knows that the DSTRIG has been primed.

The event will look like this after updating hlq.TEST1.DATASET 5 times:

EVENT ID(<eventnm>.DSTRIG)  SYSTEM(ESP)  REPLACE
SEND 'EVENT DSTRIG HAS BEEN TRIGGERED' USER(<eventnm>)
DSTRIG hlq.TEST1.DATASET ANYCLOSE MULTIPLE PRIMED
DSTRIG hlq.TEST2.DATASET ANYCLOSE MULTIPLE 
ENDDEF


As soon as hlq.TEST2.DATASET gets updated once, the event looks like this and will send the message:

EVENT ID(<eventnm>.DSTRIG)  SYSTEM(ESP)  REPLACE
SEND 'EVENT DSTRIG HAS BEEN TRIGGERED' USER(<eventnm>)
DSTRIG hlq.TEST1.DATASET ANYCLOSE MULTIPLE
DSTRIG hlq.TEST2.DATASET ANYCLOSE MULTIPLE
ENDDEF

Note that hlq.TEST1.DATASET is not primed even though it was updated five times before hlq.TEST2.DATASET was primed once.