MIDRANGE dot COM Mailing List Archive



MIDRANGE-L » March 2013

Re: File Overrides and STRSQL vs embedded SQL



On 26 Feb 2013 13:36, CRPence wrote:
On 26 Feb 2013 12:38, rob@xxxxxxxxx wrote:
<<SNIP>>
embedded sql:
exec sql create table qtemp/deleteme as
(select * from aaakey) with data;
AAAKEY in *LIBL type *FILE not found.
<<SNIP>>

<<SNIP>>


I am not aware of any relationship between the above SQL and that of the OP. Although responding to my message, my comments are about the above SQL and error noted by Rob. Instead of embedded, I used STRSQL:

At least in v5r3, there is a probable defect according to what I recall as the accepted convention for processing overrides. The override is honored by that DDL statement for its DML request, but only if the named FILE() exists wherever the SQL naming expects to find the file on the from-clause; i.e. as an unqualified name, in the CURRENT SCHEMA of either *LIBL or the authorization identifier, or when qualified, in the specified\qualified library name.

The override should enable the SELECT to pass validation without an error both when a file by that name does exist and when a file by that name does not exist, as long as the TOFILE() could pass validation if specified explicitly in the from-clause; i.e. the validation of the statement should occur against the overridden-to file.

I can never recall any past issue that was not considered a defect, whereby a file by the name specified in FILE() of an OVRDBF request must exist for the query to function. Thus IMO, the error for that DDL is incorrectly being issued, and should be pursued as a defect.






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2013 by MIDRANGE dot 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 here. If you have questions about this, please contact