Now, Get RPG Codes in all three formats only on this website on every RPGLE related programming article.

Fixed, /Free and Fully Free RPG


Trigger Limitations and Program Attributes

Trigger Limitations and Program Attributes
Trigger Limitations and Program Attributes, sql triggers, db triggers in ibmi, as400
Trigger Limitations and Program Attributes

This article has some basic information related to triggers and trigger programs. 

Trigger Program Attributes

  • The trigger is a CLE program
  • The activation group for the trigger program is *CALLER
  • Special registered values are saved before the trigger gets activated and it gets restored once returned from the trigger
  • The default storage model is STGMDL(SNGLVL)

Trigger Limitations

  • The maximum number of triggers per table is 300
  • Maximum runtime depth of cascading trigger is 200 or maximum storage of job session, whichever come first

DB2ROW vs DB2SQL

DB2ROW

The trigger gets activated (after or before) at each row.
A single statement can manipulate (add/delete/insert) multiple rows at once and the trigger will get executed for each manipulated.

DB2SQL

The trigger gets activated only after the complete statement is executed.
A single statement can manipulate (add/delete/insert) multiple rows at once but the trigger will get executed only completion of all the rows manipulation.

Related Post

Post a Comment

© AS400 and SQL Tricks. All rights reserved. Developed by Jago Desain