× 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.



Actually, Ed should have suggested the trigger time *BEFORE.  That permits
you to update the field before the record is actually inserted to the file.
*AFTER will not work - you cannot/should not be updating the same file
manually from within a trigger program - will cause triggers to fire again.

Regards,
-Greg

Gregory Novak
Manager North American Technical Services
Momentum Utilities Pty Ltd
(630) 985-1736
gnovak@xxxxxxxxxx
www.jacana.com
 
Making Information Work for your Business
www.intuator.com


-----Original Message-----
From: Kandel, Ed [mailto:EKandel@xxxxxxxxxxxxxxxxxxxxx] 
Sent: Friday, March 26, 2004 1:21 PM
To: 'MAPICS ERP System Discussion'
Subject: RE: Creating Triggers


An alternative to SQL...

Look at command:
ADDPFTRG   "Add Physical File Trigger".

Consider the trigger time (Before or After change)
Consider the event (Insert, delete, update, read)

For Shaw's application sounds like you'll want time *AFTER and event *INSERT

You'll need a program to process the event, a trigger program.  
Go here for more info on considerations...:
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm

Search  on "Trigger"...

I've done this when API or user exits are not available, work's OK.


You'll need to do this when the file or member is not in use.  Also,
document them; a MAPICS PCM will remove them someday during an update!

Best Regards, 
Ed Kandel 
Senior Programmer/Analyst 
Textron Fluid and Power 
Cone Drive Operations, Traverse City MI 
231 929-8218 

-----Original Message-----
From: Ann Neal [mailto:aneal@xxxxxxxxxxxxxxxxxx] 
Sent: Friday, March 26, 2004 2:04 PM
To: MAPICS ERP System Discussion
Subject: RE: Creating Triggers

Shawn,

We viewed an SQL webinar that said you can create an SQL trigger for a PF
now.  I have not seen the commands to accomplish this.  Maybe do a search on
www.mcpressonline.com  Or search programming list archives on the
www.midrange.com site where this list resides.  If you cannot find an SQL,
we could help with an RPGIV pgm if you have the RPG compiler.  (Today is
pretty hectic, though, would have to be next week.)

Subject: Creating Triggers

How would I create a trigger that was called when an insert was done to
a PF?  Don't I need a trigger program?  I read that this can be created
using SQL.  What I need to do is change a field in a file when a new
record is added.  Thanks for the help.

Shawn Thobe
Network Administrator
Fort Recovery Industries Inc.
419-375-4121

_______________________________________________
This is the MAPICS ERP System Discussion (MAPICS-L) mailing list
To post a message email: MAPICS-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/mapics-l
or email: MAPICS-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/mapics-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.