MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » April 2012

Re: ILE PGM getting authority error when it does have authority



fixed

FWiW, signed on as a user without *ALLOBJ authority, the same script can be much simpler, having granted the *EXCLUDE authority to their own User Profile name to setup the lack-of-authority scenario. The script can be run in the same job by the one user, without any need [for the ability] to create another user nor a separate job with that new user to show the effects for WRKOBJ vs DSPOBJD:

crtdtaara qtemp/lglnotaut *lgl aut(*exclude)
/* &curusr in next step same as if: rtvjoba curuser(&curusr) */
grtobjaut qtemp/lglnotaut *dtaara user( &curusr ) aut(*exclude)
addlible qtemp *first /* ignore already exists error */
wrkobj *libl/lglnotaut *dtaara /* Object is not listed */
dspobjd *libl/lglnotaut *dtaara /* CPF2189: LGLNOTAUT in QTEMP */

Regards, Chuck

On 05-Apr-2012 12:48 , rob@xxxxxxxxx wrote:

I wouldn't use WRKOBJ. Watch this:
CRTPF FILE(ROB/HIDDEN) RCDLEN(10)
GRTOBJAUT OBJ(ROB/HIDDEN) OBJTYPE(*FILE) USER(*PUBLIC) AUT(*EXCLUDE)
CRTUSRPRF USRPRF(DUMMY) USRCLS(*USER) SPCAUT(*NONE)
sign on as dummy
ADDLIBLE LIB(ROB) POSITION(*FIRST)
WRKOBJ OBJ(*LIBL/HIDDEN)
(Cannot find object to match specified name.) This would lead you to
assume that it doesn't exist. However,
DSPOBJD OBJ(*LIBL/HIDDEN) OBJTYPE(*FILE)
CPF2189 - Not authorized to object HIDDEN in ROB type *FILE.

Those of us routinely running under *ALLOBJ forget the trials and
tribulations of those that aren't. As such, our tests are invalid.






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact