Wildcard characters for transaction IDs

When you define a DB2TRAN resource, you can specify a generic transaction ID using asterisk (*) and plus (+) symbols as wildcard characters.

  • An asterisk (*) can be added to a transaction name, or used alone, to produce the effect on any value of making it 'wild'. The transaction name specified with an asterisk at the end of the name represents 0-3 unspecified characters in the transaction ID. For example, a TRansid of T* would represent transaction T, TA, TAB, TABE.
  • A plus sign (+) is allowed in any position to represent any single character.
  • An asterisk alone represents any transaction and can act as an alternative pool definition. It differs from a pool by having the additional attribute of the DB2ENTRY of overflowing to the pool when the thread allocation is exhausted.

The rules of matching are that the most specific match is taken. For example, transaction FRED will use DB2ENTRY(1) specifying a generic transaction ID of FRE*, rather than DB2ENTRY(2) specifying a generic transaction ID of F*. Also a '+' is more specific than a '*', eg FRE+ is more specific than FRE*.

If AUTHTYPE(TX) is specified, the actual TXID is passed to DB2® as the primary authorization ID, and not the name that used wildcard characters.

Note that if a DB2TRAN is defined using a generic transaction ID that includes a wildcard, the INQUIRE DB2TRAN command is unable to identify the individual transactions that match the generic transaction ID. For example, you can issue the command
CEMT INQUIRE DB2TRAN(*) TRANSID(ABCD)
to see details of the DB2TRAN with which transaction ABCD is associated. However, if the DB2TRAN is defined using a transaction ID 'ABC*', the INQUIRE DB2TRAN command is unable to match the DB2TRAN to the transaction ID 'ABCD', and returns a 'not found' response.