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



Have you considered writing a small program that has only the job of assigning customer numbers, then, using the *before trigger, just replacing whatever number the incoming record has with the newly assigned number from your program? That way there will never be a conflict to deal with, and a whole lot of field training that never needs to be done? (No need to teach the branches all of the rules for assigning customer numbers - just tell all branches to always use 999 as their new customer number.)

On 9/1/2011 8:30 AM, Terry Anderson wrote:
Luis,
This may be the route I need to take since this is third party software
and, as both Rory and D*B pointed out, I need to know how the calling
program will react to the error.

I am still going to research using the QMHSNDPM API to send a message to
the program stack. I have used the API to send a message to the screen
but never to the program stack. It seems to me to be a good thing to
have in my tool box.


Thanks,


Terry Anderson
Programming Manager
Grede LLC.
Switchboard 1.251.867.5481 ext 212
Direct Line 1.251.809.2312
Fax 251.867.0525
Cell 1.251.363.4975




------------------------------

message: 8
date: Wed, 31 Aug 2011 12:19:32 -0430
from: Luis Rodriguez<luisro58@xxxxxxxxx>
subject: Re: Prevent a record from being written using a trigger
program.

Terry,

Just a not very thought-out idea but, What happens if you define an
AFTER insert trigger and, if you don't like the record, just delete it?

HTH,
Luis Rodriguez
IBM Certified Systems Expert ? eServer i5 iSeries
--



On Wed, Aug 31, 2011 at 11:10 AM, Terry Anderson
<TAnderson@xxxxxxxxx>wrote:

Greetings List,
We use a third party package to maintain our customer master file.
Corporate has decided to standardize on customer numbers across our 18

divisions. They want a way to prevent the divisions from creating a
customer record that uses a non-sanctioned customer number. I do not
want to modify the third party code if I can help it.

I have used trigger programs in the past to track changes to a file
but is there a way to use one to prevent a record from writing to a
file?
If so, does someone have an example of how to do this they would be
willing to share?


Thanks,


Terry Anderson
Programming Manager
Grede LLC.
Switchboard 1.251.867.5481 ext 212
Direct Line 1.251.809.2312
Fax 251.867.0525
Cell 1.251.363.4975


--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing

list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/rpg400-l.




------------------------------

--
This is the RPG programming on the IBM i / System i (RPG400-L) digest
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.



End of RPG400-L Digest, Vol 10, Issue 551
*****************************************


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.