Does anyone know of an API or technique to check authority of an object in an rpg program? I don't want to call a CL if I don't have to. Thanks!
Announcement
Collapse
No announcement yet.
Object authority
Collapse
X
-
Re: Object authority
PHP Code:H dftactgrp( *no ) OPTION(*NODEBUGIO) ACTGRP('BIGUPDATE')
*
* Authorities can check up to 11 10 char fields
*
* *EXCLUDE Exclude authority. If this value is specified, no other values can be specified.
* *ALL All authority.
* *CHANGE Change authority.
* *USE Use authority.
* *AUTLMGT Authorization list management authority. This value is only valid if the object
* type is *AUTL.
* *OBJALTER Object alter authority.
* *OBJOPR Object operational authority.
* *OBJMGT Object management authority.
* *OBJEXIST Object existence authority.
* *OBJREF Object reference authority.
* *READ Read authority.
* *ADD Add authority.
* *UPD Update authority.
* *DLT Delete authority.
* *EXECUTE Execute authority.
*
* Variable Definition
*
d YesOrNo s 1
d Object s 20
d Type s 10
d Authority s 10
d #of s 10i 0 inz(1)
d level s 10i 0 inz
d error s 256
*
d ApiError Ds
d AeBytPro 10i 0 Inz( %Size( ApiError ))
d AeBytAvl 10i 0 Inz
d AeMsgId 7a
d 1a
d AeMsgDta 128a
*
* Program Info
*
d SDS
d @PGM 001 010
d @PARMS 037 039 0
d @MSGDTA 91 170
d @MSGID 171 174
d @JOB 244 253
d @USER 254 263
d @JOB# 264 269 0
* -------------------------------------------------------------------
* -
* -------------------------------------------------------------------
c eval object = 'QADBXREF *LIBL'
c eval type = '*FILE'
c eval authority = '*USE'
c call 'QSYCUSRA'
c parm YesOrNo
c parm @USER
c parm object
c parm type
c parm authority
c parm #of
c parm level
c parm Apierror
c eval *inlr = *on
All my answers were extracted from the "Big Dummy's Guide to the As400"
and I take no responsibility for any of them.
www.code400.com
Comment
-
Re: Object authority
nope! it only produces an error if there is lets say a bad file name passed , or library doesnt exits...
need to look @ yesornoAll my answers were extracted from the "Big Dummy's Guide to the As400"
and I take no responsibility for any of them.
www.code400.com
Comment
-
Re: Object authority
hey what a great idea...im gonna implement that here.......
Ill get back to you on the outcome.
jamieAll my answers were extracted from the "Big Dummy's Guide to the As400"
and I take no responsibility for any of them.
www.code400.com
Comment
-
Re: Object authority
make sure this is setup correctly
c eval object = 'QADBXREF *LIBL'
object is 20 *char 1st 10 must be object second 10 the library
jamieAll my answers were extracted from the "Big Dummy's Guide to the As400"
and I take no responsibility for any of them.
www.code400.com
Comment





Comment