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




The "if" statement doesn't look right to me. You're only comparing (and)
data1 to *in02, data 2, 3, 4 are ORed. Or am I missing something?

Regards,

Guy




"Joe Pluta"
<joepluta@plutabro To: "'RPG programming on the AS400 / iSeries'" <rpg400-l@xxxxxxxxxxxx>
thers.com> cc:
Sent by: Subject: RE: Matching Records
rpg400-l-bounces@m
idrange.com


11/07/2007 10:50
AM
Please respond to
RPG programming on
the AS400 /
iSeries






From: Joep Beckeringh

Actually it should be:

if not *inmr or
(*in02 and (file1data1 <> file2data1) or
(file1data2 <> file2data2) or
(file1data3 <> file2data3) or
(file1data4 <> file2data4));

Otherwise your program will fire for every record in the primary file.

Yup, you're right Joep. It has been a while <sheepish grin>. At 01NMR
time
the secondary file hasn't been read yet. I don't know what I was thinking.
So you can only check for differences on the secondary record.


In your example, which is very concise, I remember
that you need to specify end of file processing on
both the primary and secondary files or the program
will end once all records are read from the primary
file regardless if more records remain in the
secondary file. So the file spec would be IPE for the
primary and ISE for the secondary. Maybe someone else
remembers this subtlety or has additional light to
shine on the topic.

As Joep pointed out, when all the EOF fields are blank, all records are
processed. I tested it with my little program after adding data to the
file
(and realizing that Joep was dead-on about adding the *IN02 qualification).

Joe

--
This is the RPG programming on the AS400 / iSeries (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.






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.