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


  • Subject: Re: FTP Question, Urgent
  • From: Jim Langston <jimlangston@xxxxxxxxxxxxxxxx>
  • Date: Tue, 10 Apr 2001 08:32:10 -0700
  • Organization: Pacer International

Very good point, Scott, but it was intended.  This trigger is actually
set on *INSERT and *CHANGE, and this one line will work for either case:

C                   If        (CRComp = 51) And (CRCtrN <> *Blanks) And 
C                             (Or_CRCtrN <> CRCtrN)    

but it works in my situation because of the way I am using it.  I did some
testing, and on an *insert the fields in the original buffer are *blanks.
And since I want to add the record if it is a new record, or the container
number has changed, it works for me.  In either case the container number
will be different.

I actually had to go look at the program again to see where I was using the
original buffer and why.

Although, I am using an undocumented "feature" of a trigger, that currently
the original record on an insert trigger will contain *Blanks.  I guess to
make sure this works with all future versions, I should do something like:

C                   If        (CRComp = 51) And (CRCtrN <> *Blanks) And 
C                             ((Or_CRCtrN <> CRCtrN) Or NOT Insert)

which would make it work regardless of what happens to the original
buffer in the future.

This was a modification I had made to the program different, when I found
out my users were changing information I thought they wouldn't and couldn't
(container number).  I'll update the program comments right now on my system.

Regards,

Jim Langston


Scott Mildenberger wrote:
> 
> Jim,
> 
> Be careful with this trigger program!  You mentioned this is an *insert
> trigger but you are referencing part of the 'old' buffer (field Or_CRCtrN
> below) which is undefined for an *insert trigger.  Likewise, you should
> never reference the 'new' buffer on a *delete.
> 
> Scott Mildenberger
> 
> > -----Original Message-----
> > From: Jim Langston [mailto:jimlangston@conexfreight.com]
> > Sent: Monday, April 09, 2001 4:06 PM
> > To: RPG400-L@midrange.com
> > Subject: Re: FTP Question, Urgent
> >
> >
> > Here is a working version I have of an *insert trigger that
> > writes a record to an external data queue.
> >
> > C                   If        (CRComp = 51) And (CRCtrN <>
> > *Blanks) And
> > C                             (Or_CRCtrN <> CRCtrN)
> >
> +---
> | This is the RPG/400 Mailing List!
> | To submit a new message, send your mail to RPG400-L@midrange.com.
> | To subscribe to this list send email to RPG400-L-SUB@midrange.com.
> | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: david@midrange.com
> +---
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.