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



John,
Well, stuff happens, let's try to solve it.

Yes, SQL can be used but depending on the size and structure of your tables,
it could be a little slow.

Of course, you can't use it to delete the records on a join LF so, Can you
identify the fields what makes each record unique? It could be something
like, for the "header file":

hospital number
account
date
time
id of poster

and the same info for the detail file plus, for example, a unique sequence
number.

Right now my time zone says something like 5 AM, and I'll be arriving to my
work in about three hours. Please post some more info and I'll try to help.
Be aware, of course, that *maybe* your only solution available would be a
RPG program...

Regards,


Luis Rodriguez
IBM Certified Systems Expert — eServer i5 iSeries


On Tue, Sep 22, 2009 at 11:58 PM, jmmckee <jmmckee@xxxxxxxxxxxxxx> wrote:

I made a mistake today. Accidentally ran a posting program three
additional times. I normally try to automate things so dumb things like
thisdon't happen. But, this has not been a project developed in the proper
manner - meaning GET IT DONE!

The file is a join logical. Common ields are 1) hospital number, 2)
account, 3) date, 4) time , and 5) id of poster. The first four fields are
numeric and the last is alpha.

The two files are a main file with 30 characters of text and the second
file contains multiple records for additional text.

Something like 5000 records posted three extra times..

The problem will disappear in about 6 months, if nothing is done. Just
looks bad and a lot of people will see my blunder and have to deal with it.

Can SQL be used to identify when there are multiple records for the same
hospital and account number that have identical date, time, and poster id?

Can SQL be used to remove three of the four multiples?

Can SQL be used to do the previous two operations, but for one specific
account - for testing?

Would it be easier if the original posting file was available? My
assumption is yes. and that file can be available.


This doesn't effect any totals. Just looks really bad.


Seems this would be pretty simple in RPG, especially with the original file
available. Just don't know if I can get the time to devote to tis.

Is this something a) best left alone, b) best fixed with SQL, or c) best
fixed with RPG?


Easiest approach would be to back out all the records and ten post once, I
am guessing.


Wish I hadn't made the mess, in any case.

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.



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.