15 pts.
 SQL equivalent of GRTOBJAUT using Authorization List
Using SQL script, how does one grant object authority to a table using an authorization list?
 
This fails because MyAutList is not a *USRPRF: 
grant all on table mylib.mytable to MyAutList
This works, but is not what I need:
grant all on table mylib.mytable to Public 


Software/Hardware used:
AS/400
ASKED: April 28, 2011  5:03 PM
UPDATED: May 2, 2011  1:14 PM
  Help
 Approved Answer - Chosen by DavidGar (Question Asker)

Note that if this must be done in a SQL script, you can run the GRTOBJAUT command through QCMDEXC by calling QCMDEXC as a stored procedure. The GRTOBJAUT command would be passed in as a parm to a stored proc.

Tom

ANSWERED:  Apr 29, 2011  2:06 AM (GMT)  by DavidGar

 
Other Answers:

Hello,
Please write to my email address box: (khalifamorin@yahoo.com)
My name is Morin, a good looking girl.
I
became interested in you after going through your profile today and i wish to
continue relationship with you which if nature will permit we have a
long way to go.
I
have a special reason of contacting you which i will make known to you,
tell you more about myself and also send my pictures to you. I will
like you to get back to me through my email address:
(khalifamorin@yahoo.com)
Morin

Last Wiki Answer Submitted:  May 2, 2011  1:32 am  by    0 pts.
Latest Answer Wiki Contributors:    0 pts.
To see other answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

SQL has no such concept. However, normal system commands work for SQL tables, so the GRTOBJAUT command can assign an *AUTL to a table.

Tom

 107,695 pts.

 

Tom – thanks for your answers, I will pursue the QCMDEXC stored procedure route. This has long been a puzzler to me.

 15 pts.

 

Because you can call QCMDEXC without requiring any return parameter values, it can called as a stored procedure without needing to register it first as a stored procedure.

In the SQL CALL, remember that the ‘Length’ will need to be supplied as a DEC(15 5) value, e.g., 0000000123.0000 would be a 123-byte long command string. That’s probably the single biggest detail that trips these things up.

Tom

 107,695 pts.