× 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: Heads up: STRQMQRY with OVRDBF
  • From: "Reger, Bill" <breger@xxxxxxxxxx>
  • Date: Thu, 2 Dec 1999 12:29:33 -0500

As others have reported here in the past, it is possible to override the
file used by a *QMQRY thereby causing it to run against a different library,
file, or database member that what is specified by the internal SQL
statement.  This is a good thing.  However the override will cause other
"unintended results" in two situations I have found:

1.      If your *QMQRY does an SQL SELECT to an *OUTFILE with a Outfile Name
that is the same as the File Name being queried (even if it's in a different
library), the *OUTFILE will be overridden also causing you to potentially
clobber your "input" File, assuming you have enough authority.

        OVRDBF  FILE(QMQRYFILE)  TOFILE(LIBRARY/FILENAME)
        STRQMQRY  ......  OUTPUT(*OUTFILE)  OUTFILE(TESTLIBR/FILENAME)
OUTMBR(*FIRST *REPLACE)

2.      If your *QMQRY does an SQL INSERT (add selected records to another
file) and the "from" and "to" File Names are the same (even if they're in
different libraries), the "to" file will be overridden also causing you to
add duplicate records to your "from" file.

I suppose when you think about the override that this all makes sense, but
it sure surprised me when I saw it in action.  I just thought someone else
out there might want to know.

William K. Reger
Senior Project Manager
Levitz Furniture Corporation
Phone:  (561) 994-5114
E-mail:  breger@levitz.com <mailto:breger@levitz.com> 

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| 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.