That works. I can simply ignore that SQLSTATE. It generates AF entries, but this should only be a temp query.

Thanks



-----Original Message-----
From: Justin Taylor [mailto:JUSTIN@xxxxxxxxxxxxx]
Sent: Tuesday, February 18, 2020 9:27 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: QSYS2.OUTPUT_QUEUE_ENTRIES & 01548

I didn't try just ignoring the SQLSTATE 01548. I'll give that a shot.

Thanks



-----Original Message-----
From: Rob Berendt [mailto:rob@xxxxxxxxx]
Sent: Tuesday, February 18, 2020 8:11 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: QSYS2.OUTPUT_QUEUE_ENTRIES & 01548

Ok, I think you will get that message if there are secured output queues. However it should retrieve the results to those she does have access to.
I created a user with no special authority on systems with secured output queues.
Even though I got the following message I did get the ONE spool file the user has.
You need to decide if this is ok. Like, if there is a possibility that the user has a spool file in the restricted output queue and so on. It's up to you to decide whether to treat this an informational message, warning or exception.

ps: There is another view which may perform better but it returns less information. Not that it will behave any differently when it comes to secured output queues: OUTPUT_QUEUE_ENTRIES_BASIC

[ Tue Feb 18 09:01:24 EST 2020 ]  Run Selected...  select * from qsys2.output_queue_entries where user_name='DUMMY'  SQL State: 01548 Vendor Code: 462 Message: [SQL0462] Procedure or user-defined function OBJECT_STATISTICS in QSYS2 returned a warning SQLSTATE. Cause . . . . . :   An SQLSTATE of the form 01xxx was returned by the procedure or user-defined function OBJECT_STATISTICS in QSYS2 (with specific name QSQOBSTAT), along with message text NOT AUTHORIZED TO OBJECT. Recovery  . . . :   The user must understand the meaning of the warning. See your database administrator, or the author of the user-defined function or procedure.  Statement ran successfully, with warnings   (121,779 ms  =  2.03 min)



Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600 Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com




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.