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



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).
If the view itself is not qualified it is created in the QGPL library
(System Naming) or the default/Current schema (SQL Naming).

With SQL Naming only a single Schema is searched. If a current schema is set
only this schema is searched even when working with System Naming
conventions.
If DFTRDBCOL is set in the RUNSQLSTM Command it is handled like a current
schema.

So, you need to qualify.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
?Train people well enough so they can leave, treat them well enough so they
don't want to.? (Richard Branson)


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
CRPence
Sent: Mittwoch, 5. Juli 2017 23:21
To: midrange-l@xxxxxxxxxxxx
Subject: Re: create view in current schema

On 05-Jul-2017 14:51 -0600, Steve Richter wrote:
when I create a view with an unqualified view name the view is
created in the library of the first from file. So I qualify the
view name. But that is a problem when I want to create a test
environment.

I use "set schema testlib" to set the current schema. But setting the
current schema means the unqualified from file is searched for in only
that schema.

How to create a view in the current schema but still search the
library list for the from files?

I am using RUNSQLSTM to run the CREATE VIEW statements. Using *SYS
naming.

Tried setting DFTRDBCOL parm of RUNSQLSTM to the name of the data file
library. But that caused the unqualified view name to be created in
that library.

Unfortunately there is no SQL naming option of "screw ANS" per
NAMING(*SYSTEM_FOR_BOTH_CREATE_AND_RESOLVE_NOT_JUST_THE_LATTER)

A Doc reference can be found in the following message:
(https://archive.midrange.com/midrange-l/201605/msg00765.html)[SQL
*SYSTEM naming default schema rule?]

Of possible additional interest:
(https://archive.midrange.com/midrange-l/201605/msg00763.html)[SQL
*SYSTEM naming default schema rule?]
(https://archive.midrange.com/midrange-l/201605/msg00771.html)[SQL
*SYSTEM naming default schema rule?]

And more generally, for that message thread:
(https://archive.midrange.com/midrange-l/201605/threads.html#00749)[SQL
*SYSTEM naming default schema rule?]

--
Regards, Chuck

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

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-Ups:
Replies:

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.