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



I did a Google and found an example. When I tried to compile, got
errors on the ds. Added e. No errors. Does not remove records.

Morning file has 22271 and more recent file has 22963

My program apparently is not detecting equality in the records.

I can't imagine a much simpler program. But, it is obviously incorrect.

It is very short. Thought about posting it, but the formatting is
really messed up.

Seems like it does everything mentioned. But, apparently it isn't.

John McKee



On Tue, May 1, 2012 at 2:59 PM, Stone, Joel <Joel.Stone@xxxxxxxxxx> wrote:
Couldn't SQL handle this task simpler and potentially process faster?

Something like Delete from 2nd file where (join =)

RTVMBRD to get the record length &R and CRTPF reclen(&R) then ovrdbf & run SQL

?



-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Pat Barber
Sent: Tuesday, May 01, 2012 2:48 PM
To: Midrange Systems Technical Discussion
Subject: Re: Stupid question

I would do as Paul mentioned with internal files and single field for
each record.

I would then write a very simple matching records program with a
M1 indicator on each record.

Very old but very effective way to do what you are trying to do.

It would very fast compared to all that chaining.

Maybe  10-15 lines of code.

On 5/1/2012 9:16 AM, John McKee wrote:
I posted this (I think - never get emails from posting) to the RPG
list.  Never received a reply.

I have two files.  Different names, formats, and field names.

One is produced early in the day.

I need to remove records from the second file that are identical to
those in the first file.  Thus, second file only has new and changed
records.

I am stuck on how to set up a comparison of the entire record from
each file.  I know I have done this, many years ago, but my brain is
just too foggy.  I just don't want to have an IF with 90+ field
comparisons.

Logic is simple - read file 2, attempt to chain to file 1.  No chain -
a new record.  If chain is successful, compare the two records.  If
same, delete record from file 2.

I can't directly compare the record formats.  How do I define a single
field over each record?

I tried I-Specs - File name followed by single field name..

Dumb question.  Thanks for a nudge.

John McKee
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


________________________________________________________________________
This inbound email has been scanned for all viruses by the MessageLabs SkyScan
service.
________________________________________________________________________

______________________________________________________________________
This outbound email has been scanned for all viruses by the MessageLabs Skyscan service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


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.