× 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: Need Help
  • From: peteh@xxxxxxxxxxxxxxxx (Pete Hall)
  • Date: Thu, 31 Jul 1997 21:37:58 -0500
  • In-Reply-To: <c=US%a=_%p=Packerland%l=PPCUB02-970731142630Z-157@ppcub02.www.packerland.com>

In message 
<c=US%a=_%p=Packerland%l=PPCUB02-970731142630Z-157@ppcub02.www.packerlan
.com>, From Greg Weber <IGRWU@Packerland.com>, the following was
written: > in File A I need to know that.  I Was going to read File A
and chain  > out to File B to see if the record exists in File B.  I am
having  > problems on how to determine if there is a record in File B
that is  > not in File A.  Any help would be greatly appreciated.

Greg,

You need to read both files sequentially by key and compare the ordinal
key values when they are not identical. Then read the file with the
lower value. Incidentally, this is exactly what matching record
processing does. Most guys won't admit that they ever used 'em, but
since it's you...

FFILE1   IPAE E       K      DISK
FFILE2   ISAE E       K      DISK

IFILE1R     01
I                       KEY     L1M1

IFILE2R     02        
I                       KEY     L1M1

C 01 MR      EXSR BOTH1
C 02 MR      EXSR BOTH2 
C 01NMR      EXSR HAVF1
C 02NMR      EXSR HAVF2

It's been a LOOONG time, but it's something like that. BOTH1 handles
matches when file 1 has provided the current record. BOTH2 is for
matches when file 2 is the current record, HAVF1 is for file 1 records
with no match in file 2, HAVF2 is for file 2 records with no matching
file1. I think you can use externally described files with MR, although
I can't remember for sure. The puzzling thing about matching records is
that if you have several level break fields, you can code M1, M2, M3,
etc, but the result is always in one indicator (MR), and only one record
(the lowest key value between all input files) is read on each cycle,
but MR is dependent on both files. When you have a match, MR will be on
for 01 on one cycle, and 02 on the next. Don't tell anybody I told you.

OK, now on to look-ahead fields...

Pete


--
 - Pete Hall peteh@earth.inwave.com
http://www.inwave.com/~peteh/

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the Midrange System Mailing List!  To submit a new message,   *
* send your mail to "MIDRANGE-L@midrange.com".  To unsubscribe from     *
* this list send email to MAJORDOMO@midrange.com and specify            *
* 'unsubscribe MIDRANGE-L' in the body of your message.  Questions      *
* should be directed to the list owner / operator: david@midrange.com   *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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.