× 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, I haven't tried the exact scenario with which you're dealing. But
(this works for logical files which can represent a view and/or an index)
if I have the file in production and do a CRTDUPOBJ when the based-on
files (aka, tables) are in the current library, the system uses the test
library for based-on files. I can't say I've done this where the based-on
files are scattered across multiple libraries. It may not work because if
the based-on files are qualified.

If you must resort to qualifying, you would have to copy the production
source to a temporary or test source that you could then scan and
replace/insert qualifications into--this could be done manually or
programmatically. Not very pretty, but a limitation for views based on
files from multiple libraries.

Just a possible suggestion,
Michael Quigley
Computer Services
The Way International
www.TheWay.org

"MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx> wrote on 07/06/2017
06:30:07 AM:
----- Message from Steve Richter <stephenrichter@xxxxxxxxx> on Thu,
6 Jul 2017 06:29:15 -0400 -----

To:

Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>

Subject:

Re: create view in current schema

Just so I understand, SQL naming is a waste of time. With SQL naming
you
only work in one schema at a time. Unless you qualify your references.

When creating a view the unqualified specified database objects are
resolved
from either the library list (System Naming) or the current/default
schema
(SQL Naming).

I am finding that once you "SET SCHEMA" the code runs as if SQL naming
is
in effect. All unqualified references look in the current schema only.

If the view itself is not qualified it is created in the QGPL library
(System Naming)

just to clarify, an unqualified view is created in the library of the
first
from file. Unqualified tables or routines are created in the current
library.

So, you need to qualify.

which is a real pain in the neck. How to code a CL procedure that will
setup a test environment when multiple libraries are being used?

I have an INFOR production data library. And an INFOR test data
library.
Then a production library which contains custom written programs, views
and
even data tables. The code that creates a view is stored in a source
member and is run using the RUNSQLSTM command. That create view code
qualifies the view being created to place it in the production custom
library.

Now to create a custom test library I would like to run each of CREATE
VIEW
statements. But I cannot because the view name is qualified to the
custom
production library.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) digest
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.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link:
http://amzn.to/2dEadiD

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.