How to add a Trigger program to a physical file in ALDON

140 pts.
Tags:
ALDON
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: August 22, 2013  5:12 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

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.

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • C.naveen09
    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 pointsBadges:
    report
  • Teandy
    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,860 pointsBadges:
    report
  • TomLiotta
    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
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following