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



First of, MANY thanks for suggestions. Problem has been identified.
Years ago, in IBM COBOL manuals for the big iron, the compiler
messages were detailed. About two messages per page. Each
explanation started the same way: Blah, blah, blah, probable user
error......

This thing was in that line. I was so focused on the mechanics of the
program. Too focused, as it turned out. I was so concerned about how
the record check logic worked that I forgot a very important detail -
run the darned program. Or, as Homer Simpson apparently often says:
DOOOOOOOH!

What finally tipped me off (woke me up) was running the thing in
debug. Set a breakpoint on the priming read, run the program, and
nothing happens.

I did learn a lot, and I am very grateful for your time attempting to
help me. I apologize for inflicting my apparent incompetence on this
list. The program was intended as a test bed. Logic to locate
duplicate records has been incorporated into the main program, thus
dropping the delete of thousands of unchanged records, which are no
longer written on the second run in the first place.

Very sheepishly,

John McKee
On Wed, May 2, 2012 at 12:28 PM, Peter Dow <petercdow@xxxxxxxxx> wrote:
No regard for column names, but the number of columns and the data types
of each column must match for EXCEPT to work.

On 5/1/2012 4:45 PM, CRPence wrote:
On 01 May 2012 16:24, John McKee wrote:
Nice to know, and loads simpler.  Maybe this is the way to go.
Still wonder just what the heck I am doing wrong.
    I did not even look at the RPG source provided; figured it would move
to the RPG list eventually.

Maybe a dumb question, but with different column names, would SQL
just compare data with no regard to column names?
    Works fine; i.e. irrespective of column names.

    For example:

<code>

      create table qtemp/"a.m."
      (xamchar char, xamdate date not null with default, xamdeci dec)
      ;
      create table qtemp/"p.m."
      (xpmchar char, xpmdate date                      , xpmdeci dec)
      ;
      insert into "a.m." values
       (1,default,1),(2,default,2),(3,default,3),(4,default,4)
      ,(5,default,5),(6,default,6)
      ; -- Above is the "morning" snapshot of the data
      insert into "p.m." (select * from "a.m.")
      ; -- make an identical copy to add\upd only the "odd" rows
      update "p.m." set xpmchar='A'          where xpmchar='1'
      ; -- change first  column for row 1
      update "p.m." set xpmdate=NULL         where xpmchar='3'
      ; -- change second column for row 3
      update "p.m." set xpmdeci=55           where xpmchar='5'
      ; -- change third  column for row 5
      insert into "p.m." values(7,current date,7)
      ; -- insert an entirely new   row 7
      select * from "p.m."
       except
      select * from "a.m."
      ; -- report of above SELECT follows:
      ....+....1....+....2....+..
      XPMCHAR  XPMDATE   XPMDECI
         A     05/02/12        1
         3     -               3
         5     05/02/12       55
         7     05/02/12        7
      ********  End of data  ********

</code>

Regards, Chuck
--
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.