× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi,

I'm not sure I'm understanding your question.  Triggers and constraints are
related to records in a file.  It sounds as if you are talking about
deleting the whole file (object), which is not going to invoke any trigger
or constraint.  If you intend to destroy the contents of a file and invoke
your cascaded deletes, you must perform a record level operation, such as
"DELETE FROM PARENT_TABLE".

hth,

Eric DeLong
Sally Beauty Company
MIS-Project Manager (BSG)
940-898-7863 or ext. 1863



> -----Original Message-----
> From: nb@unitessile.it [mailto:nb@unitessile.it]
> Sent: Tuesday, August 20, 2002 5:52 AM
> To: rpg400-l@midrange.com
> Subject: Why the hell ADDPFTRG ... TRGEVENT(*DELETE) & ADDPFCST ...
> DLTRULE(*CASCADE) can't Coexist on the same file???
>
>
>
>
> Hi to all and sorry for my poor english.
>
> We're trying to add both the instruction in subject to a PF
> (which is dependent
> of another file) and ended up with CPD321C - Reason 5: cannot
> have a a DELETE
> trigger on a CASCADE file. We've waiting to move up to 5.1.0
> to see if it is
> fixed, but still no luck.
>
> Is there any rasonable motivation to do so?? I mean, i expect
> i can do this in
> order to have record for file MYFILE in order to get record deleted
> automagically when his "father" is deleted *and* the system
> do perform some
> operation in the meanwhile (mainly, update some other file &
> write deletions to
> a log). Seem to me logic, basing on what i understand
> costraint & trigger are
> for.
>
> I thought that, when i delete FILEA, the system will check
> for every record
> matching the costraint to FILEB, delete it and so activate
> the appropriate
> trigger. Seems i'm wrong, but cant' understand why...
>
> We tried, of course, the reverse: first add the trigger, then
> add the costraint,
> but still (umpah !!!) no luck. IBM checked even this  :-(
>
> Is there any hope this can be fixed/circumvent in any way or
> we must modify
> programs so that depending file are manually deleted insted
> of automatically??
> (i know i can do this by a trigger on the first file, but i
> think it's the
> system that ahve to take care of this, not me....)
>
> Thank you.
>
>
>
>
>
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L)
> mailing list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>
>



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.