What are Triggers?
Answer Posted / sujanindian
Triggers is a self contained set of transact executable
statements which can be invoked during the operations such as
insert,update,delete can be performed in a database file.
We can able to add trigger in a physical file :
ADDPFTRG
to remove a trigger : RMVPFTRG
In the case of SQL/400 we can create trigger by ....
>>STRSQL
>>CREATE TRIGGER TRG_Name
after INSERT/DELETE/UPDATE On PF1
Insert Into PF2 Values ('RECORDS DELETED IN PF1')
>>Delete FROM PF1 Where Recordno = 10
>>SElect * FROM PF2.
In the above code, the records in the PF1 is deleted , at
once the trigger trg_name is fired and the given insert
statement is activated in pf2.
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
what is the length of a variable in rpg?
how do handle file exception/error?
how many levels are there in a physical file?
how to pick up the changed records every time in a subfile after the first change made ?
what does defn do?
what are all the contents of subfile?
WHAT is STORED PROCEDURE CONCEPT IN AS400 WITH EXAMPLE?
which are the query selection criteria, which can be given in a query?
What is array in as400? What are the types of array?
what are the different types of data areas?
what is the use of sflend keyword?
The content of Physical file is as below: hfcftp wruquief SENDPASV 0 CDUP ASCII GET 01100901.CSV ramndk/ECP505.EC0110090 (REPLACE QUIT Thw above commands will get executed when we call STRTCPFTP from CL program.... Now if I want to use SFTP what can be the solution? plz reply in detail....Thank you for ny help... I m using RPG/ILERPG to download...
Can we debug the MSGW JOBS?
define what a data queue is along with a brief example of what it may be used for?
distinguish between terminating a program through seton lr and return?