Hi Binyamin,
    There isn't a CREATE SCHEMA statement in DB2 Z/OS m however my apologies,  
I've had an embarrassingly stupid drastic senior Duffus moment.

The set schema will allow the explain to explain a package that has a Qualifier 
the same as the SCHEMA name.

The explain statement will use the current SQLID.
If you give your explain tables an alias of your SQLID, then the explain will 
find the tables.

I had forgotten that we created one set of explain tables then added an Alais 
for each user.
That's how we got around having to allow set current sqlid.

Once again, my apologies for the previous duff information.

Regards,
             Ron







-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Binyamin Dissen
Sent: Wednesday, 26 November 2025 9:12 PM
To: [email protected]
Subject: Re: DB2 query - is there a way to give a specific permission for a 
user to SET CURRENT SQLID to another user?

On Tue, 25 Nov 2025 19:50:13 -0600 Jon Perryman <[email protected]> wrote:

:>On Wed, 26 Nov 2025 01:30:16 +0200, Binyamin Dissen 
<[email protected]> wrote:

:>>The table exists under the the ID that I do a SET CURRENT SQLID.

:>SET SQLID is not valid for your situation because you did not implement the 
exit.

When the SQLID is a group name and connected to the user it does work. I am 
trying to avoid this requirement.

:>>Did the SET SCHEMA

:>>DSNT408I SQLCODE = -219, ERROR:  THE REQUIRED EXPLANATION TABLE  DOES NOT 
:>>EXIST

:>Notice "TABLE  DOES" shows the table name is null. I wonder if it's caused by 
the invalid SET SQLID.

The SET SCHEMA had SQLCODE 0

:>>SET SCHEMA was ignored for the EXPLAIN table name.

:>Did you specify AUTHORIZATION 'uuu' on the CREATE SCHEMA where uuu is the 
name you specified on the SET SQLID?

I can't find the CREATE SCHEMA command in the DB2 V3.1 SQL Reference

--
Binyamin Dissen <[email protected]>
http://www.dissensoftware.com/

Director, Dissen Software, Bar & Grill - Israel

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN


Unencrypted electronic mail is not secure and may not be authentic. If you have 
any doubts as to the contents, please telephone to confirm. This electronic 
transmission including any attachments is intended only for those to whom it is 
addressed. It may contain copyright material or information that is 
confidential, privileged or exempt from disclosure by law. Any claim to 
privilege is not waived or lost by reason of mistaken transmission of this 
information. If you are not the intended recipient, you must not distribute or 
copy this transmission and should please notify the sender. Your costs for 
doing this will be reimbursed by the sender. We do not accept liability in 
connection with computer virus, data corruption, delay, interruption, 
unauthorised access or unauthorised amendment.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to