× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



GRTOBJAUT will let you change/grant authority:

GRTOBJAUT OBJ(YOURLIB/*ALL) OBJTYPE(*FILE) USER(FRED ETHEL) AUT(*CHANGE)

Better is to create an Authorization List (CRTAUTL) and assign the
authority for the users to the list.

GRTOBJAUT OBJ(YOURLIB/*ALL) OBJTYPE(*FILE) AUTL(YOURAUTL)
GRTOBJAUT OBJ(YOURLIB/*ALL) OBJTYPE(*FILE) USER(*PUBLIC) AUT(*AUTL)

Once this is done you can change the authority to all objects secured by
the authorization list in one swell foop. Change the AUTL, and all
objects obey the change.

The only issue with doing it this way is that you're affecting all
objects in the library-- you need to pick a 'quiet time' so you can get
the necessary locks on the objects. Files in this case.

We use a program to make these changes-- we do it object-by-object so we
don't disrupt things too much.

This is a stripped-down example program. It will work on a single
object at a time, not the entire library-- If you want to fix the
authority for every object you won't have more than one object under
repair at once.

Make a copy of the file QADSPOBJ from QSYS into a work library (I named
this file QAFIXAUTH). The reason you make a copy is because I didn't
and fouled things up once-- I had 2 programs, program A called program
B, and both of them needed to DSPOBJD to an outfile. My habit had been
to DCLF QADSPOBJ then OVRDBF QADSPOBJ to the file I used in that
program. This caused all sorts of fun and frolic when programs A and B
were competing for the file! DON'T DO THIS!!


PGM
DCLF QAFIXAUTH /* this is a copy of QADSPOBJ from QSYS
(output from DSPOBJD) */
DSPOBJD OBJ(YOURLIB/*ALL) OBJTYPE(*FILE)
DETAIL(*SERVICE) +
OUTPUT(*OUTFILE)
OUTFILE(QTEMP/QAFIXAUTH)
/* notice the outfile has the 'right'
name but is in QTEMP */
OVRDBF FILE(QAFIXAUTH) TOFILE(QTEMP/QAFIXAUTH)
SECURE(*YES)
/* this leaves your original file
QAFIXAUTH intact (and empty), +
and uses the copy in QTEMP for its
work area */
LOOP: RCVF
MONMSG MSGID(CPF0000) EXEC(RETURN)

/* optional--> RVKOBJAUT OBJ(&ODLBNM/&ODOBNM) OBJTYPE(&ODOBTP)
USER(*ALL) AUT(*ALL) */
/* optional--> CHGOBJOWN OBJ(&ODLBNM/&ODOBNM) OBJTYPE(&ODOBTP)
NEWOWN(YOUROBJOWNR) */
GRTOBJAUT OBJ(&ODLBNM/&ODOBNM) OBJTYPE(&ODOBTP)
AUTL(YOURAUTL)
GRTOBJAUT OBJ(&ODLBNM/&ODOBNM) OBJTYPE(&ODOBTP)
USER(*PUBLIC) AUT(*AUTL)

GOTO LOOP


Paul E Musselman

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.