Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Engineering

Automating Checks For Failure

  • Last UpdatedJan 26, 2022
  • 2 minute read

To reduce the Administration of updates, it is possible to write a macro to collect failures and messages from the Transaction database. This manual includes a chapter on the structure of this database (See Transaction Audit Trail).

The structure of a Transaction command can be quite complex. This chapter contains detail that will be useful to a macro writer.

Each command consists of a number of operations, some of which may be commands for a remote location. Each of these in turn may also contain a set of operations and remote commands. Operations may be dependent on the success (or failure) of earlier operations. Some commands, such as REMOTE MERGE, or EXTRACT CLAIM are quite complex. Others, such as scheduled updates (UPDATE ALL) are relatively simple. (See also the Powerpoint presentation on Transactions)

Each scheduled update has an associated command element (TRINCO) which is stored under the TIMEDUPDATES user for the date:

/2005/OCT/5/TIMEDUPDATES/ABC

where ABC is the LOCID of the location owning the Update event (LCOMD). PML Collection syntax can be used to extract the Failures:

COLLECT ALL TRFAIL WITH (TYPE OF OWNER NEQ |TRMLST|) FOR !DBREF

where !DBREF refers to the timed update element above.

Generally, successes (TRSUCC) and failures (TRFAIL) can be ignored when they are owned by TRMLST, since these are progress messages. Only those in the Success list (TRSLST) and Failure list (TRFLST) need to be considered.

Alternatively the Transactions Utility Appware could be used as a basis for a suitable macro, since the embedded methods are extracting this information. There are two main forms involved:

!!glbtransactions for transaction command summary

!!glbtransactionmessagesfor transaction messages, failures and successes

These forms are files in %PMLLIB%\global\forms with the suffix .pmlfrm.

These forms use the Appware object GLBTRANSACTION. This contains suitable methods using the COLLECTION object and EXPRESSION filters to collect successes and failures.

When a command is stalled, this is only reported as a Message (TRMESS) in the Message list (TRMLST). There is no corresponding success or failure, since the command may well complete on a re-try.

Note:
Some commands (such as Claims) use Successes as a way of passing data between operations, so contain fairly obscure data.

TitleResults for “How to create a CRG?”Also Available in