× 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, John,
It depends on how you have the defaults set for the IBM CRTLIB command, and how you have the system value QCRTAUT set.   If you did not modify the CRTLIB command, and you set QCRTAUT to *EXCLUDE then no one else other than whomever created it would be able to mess with it, unless the user who created it has the user profile set to *GRPPRF for object owner ... then anyone in that group would have access.
Another way to attack it is to use SQL GRANT and REVOKE commands, or just issue the OS/400 or IBM i CRTLIB command before the SQL CREATE SCHEMA, so that way you can set the AUT to *EXCLUDE on the CRTLIB command, and then when you issue the CREATE SCHEMA, I am pretty sure it will not alter that.
Mark
On Thursday, November 2, 2023 at 06:45:32 PM EDT, smith5646midrange@xxxxxxxxx <smith5646midrange@xxxxxxxxx> wrote:

Maybe I missed something in Mark reply but I believe that your initial assumption was correct.  I'm not logged into a system so I can't confirm.  @TEMP would be common library like QGPL, not like QTEMP and anybody would be able to update any "variable" in it.  In other words, I could update a variable that you create and you would use my value, not yours.

Mark - Can you confirm that statement?



-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Dan
Sent: Thursday, November 2, 2023 6:04 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Run SQL Scripts: Define variables whose values are prompted

<Fat-fingered send>
Still, I like this better because it means no other user could potentially overwrite the variable I created via their own CREATE  OR REPLACE VARIABLE of the same name as mine.

- Dan

On Thu, Nov 2, 2023 at 6:02 PM Dan <dan27649@xxxxxxxxx> wrote:

I've not tried it in STRSQL, but in ACS Run SQL Scripts, when I tried
this, I had to qualify the files.  Not sure why that happened when the
default schema was previously QGPL and I didn't need to qualify the files.
Still, I like this better because it means no other user could
potentially overwrite the variable I created via their own CREATE
VARIABLE

On Thu, Nov 2, 2023 at 5:48 PM Mark Waterbury <
mark.s.waterbury@xxxxxxxxxxxxx> wrote:

So, it turns out you could do something like this in STRSQL:

CREATE SCHEMA @TEMP
SET SCHEMA @TEMP
CREATE VARIABLE whatever ...
SET SCHEMA someother
Do stuff ...
If you need to use the variable, you need to qualify it with the
schema,
e.g.:
    @temp.whatever  ...
Then, when done, and you want it "gone" do this:
    drop variable whatever
    drop schema @temp
So, the create schema creates a *LIB, the drop schema deletes it. 
:-)

HTH,
Mark


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.