|
Thanks Birgitta. I'm definitely going with the OVRDBF; it worked fine once I put my variable outside the quotes ;-P The Alias thing did pique my interest, and then dynamic SQL just opens up a whole new sandbox to play in. Thanks for giving me a feel for the pros and cons. It's always exciting to learn and use new methods (new to me anyhow), but as you point out, in this case it looks like sticking with the "old" OVRDBF is the best way to go. Greg >-----Original Message----- >From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l- >bounces@xxxxxxxxxxxx] On Behalf Of Hauser, Birgitta >Sent: Wednesday, October 05, 2005 2:48 AM >To: 'Midrange Systems Technical Discussion' >Subject: AW: OVRDBF and SQL > >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 >> > >-- >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. > >-- >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 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.