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



Hi Greg,

I think using the OVRDBF command would be the best solution.

An ALIAS is an permanent object (DDM-File) that can be created once and used
multiple times. In contrary an OVRDBF creates no object, but overrides the
file temporarily. That means the override will be deleted by executing the
DLTOVR-Command, but at the latest at the end of job.
 
Creating an ALIAS for muli-member files is great, because it only must be
created once and can be used whenever it is needed.

In my opinion creating a an ALIAS temporarily by using dynamic SQL does not
make sense in your case.

An other way would be using dynamic SQL instead of overriding the files. But
dynamic SQL has some disavantages compared with static SQL:
1. Syntax checking must be executed at run time.
2. The conversion of the text string into an executable SQL statement at run
time will cause some overhead.
3. No access plan, that can help to determine the optimal access paths will
stored in the program object.

Birgitta

-----Ursprüngliche Nachricht-----
Von: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von Fleming, Greg (ED)
Gesendet: Dienstag, 4. Oktober 2005 23:48
An: Midrange Systems Technical Discussion
Betreff: RE: OVRDBF and SQL

Rob,

I was looking at that (saw a reference in the archives, and looked it up
in Paul Conte's excellent tome).

I can see how it works for an multi-member file, but I'm not sure how to
use it in my case, since I am passing in a completely different file
name as a parameter.  The SQL Reference tells me the alias name can't be
the name of an existing file, and the compiler won't let me use a
variable as the file name, eg:

Create Alias MKPHSW
For :P#File

So how do I get SQL output normally directed to MKPHSW to output to the
value found in P#File instead ? 

Thanks

Greg

>-----Original Message-----
>From: midrange-l-bounces@xxxxxxxxxxxx 
>[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
>Sent: Tuesday, October 04, 2005 5:22 PM
>To: Midrange Systems Technical Discussion
>Subject: Re: OVRDBF and SQL
>
>
>See also
>CREATE ALIAS
>
>Rob Berendt
>-- 
>Group Dekko Services, LLC
>Dept 01.073
>PO Box 2000
>Dock 108
>6928N 400E
>Kendallville, IN 46755
>http://www.dekko.com
>


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.