× 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: DoU...
  • From: "Wanda Gigger" <wgigger@xxxxxxxxxxxxxxxxx>
  • Date: Mon, 11 Dec 2000 09:22:37 -0600
  • Importance: Normal

I would create a foreign key (keylist) with the key being EqId, EqNo, RefB.
Then I would chain to that key...
keylist     CHAIN       filename
            IF          %found
            (your code)
            ENDIF
-----Original Message-----
From: owner-rpg400-l@midrange.com [mailto:owner-rpg400-l@midrange.com]On
Behalf Of Jim Langston
Sent: Friday, December 08, 2000 6:15 PM
To: RPG400-L@midrange.com
Subject: DoU...


I am writing a new program, and one of the things I am trying to do is
to see if a record already exists.  The Key for this record has the
Equipment Number (in 2 parts, EqId and EqNo) and Entry date.

What I am actually looking for is the record with the same equipoment
number and the existing RefB (Customer Refernace Number) matching.

This is the way I'm doing it, and obviously after this code I am going
to have to do a If FoundMatch = *On, or to put a call to a subroutine
just before, or after, the Eval FoundMatch = *On.

It's not, IMO, real clean code.  I seem to think it can be streamlined a
bit.  I am only reading the records with the same container number as I
use a SetLL and my DoU will fail when the container doesn't match.

Any suggestions?  All comments welcome.

 C                   Eval      FoundMatch = *Off
 C     CCOHD_Key     SetLL     OHdRc
 C                   Read      OHdRc
 C                   DoU       FoundMatch = *On
 C                             Or %Eof(OHdRc)
 C                             Or EQEqId <> RXEqId
 C                             Or EqEqNo <> RXEqNo

 C                   If        %Trim(OHBL#) = %Trim(RXInv#)
 C                   Eval      FoundMatch = *On
 C                   Else
 C                   Read      OHdRc
 C                   EndIf

 C                   EndDo

Regards,

Jim Langston
+---
| 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 ...

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.