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
how do you pass parameters in cl?
which cl command is used to trap error messages during program execution?
WHICH REPLY CODE IS USED BT sftp ? ... (e.g.226 is used by FTP IF FILE IS TRANSFERED)
Hi,Can any body give the code for the below mentioned quetion.?Im trying to get coding in with easily inderstanding.Plese give me the coding for this? 1.How would you achieve this requirement with out using RPG/RPGLE pgm,but by using only CL?Read a database file and display file contents on the screen when enter key pressed the next record should be displayed on screen.When the last record is reached or when F3 key is pressed the program should exit if the file is empty,a message should be displayed indicate that there are no records to display. Database file Name=EMPDBF Fields in EMPDBF to be displayed on screen Employee Number- EMPNUM(5,0) Employee Name- EMPNAM(30,A) Employee Address-EMP ADDR(50 A)
how will you display a particular page in subfile ?
Explain this error: "all record formats for externally-described file abcd ignored or dropped due to error; file ignored."?
is their a difference in cobol400 for the release 5.2 and 6.1 at the as400.
what are different types of substems?
writing an sql statement from selecting records from two files using single statement and nested select statement.
what is elastic and non elastic subrile?
What is binder language ?
what is the function of cpyf command?
when are the unique constraints executed?
during input operation which indicator position is seton if there is a record lock?
Space & Skip Are Which Level Keywords?