140 pts.
 AS/400
Can anyone please tell me how to add a Trigger program to a physical file in ALDON(Change Management Tool) and promote it???

Software/Hardware used:
As/400
ASKED: March 8, 2010  9:20 AM
UPDATED: March 9, 2010  6:48 AM

Answer Wiki:
For a simple table that looks like this: CREATE TABLE &LIB/ACMSTABLE ( KEY_NBR FOR COLUMN TSTNBR NUMERIC(9, 0) NOT NULL DEFAULT 0 , UPDATE_TS FOR COLUMN UPDATETS TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , CREATE_TS FOR COLUMN CREATETS TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , UPDATE_USER FOR COLUMN UPDATEUSER CHAR(18) NOT NULL DEFAULT USER, CREATE_USER FOR COLUMN CREATEUSER CHAR(18) NOT NULL DEFAULT USER, PRIMARY KEY( KEY_NBR, TEST_CHAR ) ) ; Here is a simple BEFORE-INSERT trigger definition: CREATE TRIGGER &LIB/ACMSTABLE_BEF_INS BEFORE INSERT on ACMSTABLE REFERENCING NEW as NROW FOR EACH ROW MODE DB2ROW BEGIN SET NROW.UPDATE_TS = CURRENT TIMESTAMP; SET NROW.CREATE_TS = CURRENT TIMESTAMP; SET NROW.UPDATE_USER = USER; SET NROW.CREATE_USER = USER; END Compile the table, then compile the trigger. I can't help with the promotion, that is handled by another team here due to Sarbanes-Oxley 8^( . There were problem in early releases of Aldon that were due to bugs in ACMS. They quickly fixed those once they were identified. What version are you on? We are aon 7.5A. I think it was 7.3 that first handled SQL objects. 7.4 provided the fixes.
Last Wiki Answer Submitted:  March 8, 2010  2:55 pm  by  NullFields   880 pts.
All Answer Wiki Contributors:  NullFields   880 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

hi . I have a PF(ex : ABC) already in production. I need to add a trigger program(ABCD) to that file through ALDON and should promote to production.

Please tell me how to perform this??

 140 pts.

 

I’m not sure how to do this with ALDON but you should be able to add your trigger with the ADDPFTRG command. I imagine that is what ALDON is doing under the covers.

 5,830 pts.

 

I would expect that Aldon allows you to create something like custom “types” for promotion. Create a type like “PFTRG” that runs commands to replace triggers when you promote it. Promote the PFTRG object together with your trigger program.

I’m almost certain that that’s not enough to tell you what to do, but it might spark some thoughts from someone else who has Aldon available. If you can wait a couple days, I might be able to investigate Aldon to see how it works.

Tom

 107,915 pts.