|
midrange-l-request@xxxxxxxxxxxx wrote: > 6. Re: Adopted Authority (David Gibbs) > >MWalter@xxxxxxxxxxxxxxx wrote: > >> Now, How does one use adopted authority? > >It's deceptively simple ... > >Compile the program that performs the function you want. Change the >owner of the program to whoever actually has the authority you want to >adopt, then do a CHGPGM and set USRPRF(*OWNER) and USEADPAUT(*YES). Just a minor clarification... the USEADPAUT(*YES) might or might not be appropriate; impossible to tell from the original request though it seems unlikely to be needed. This parameter would be needed if the previous program(s) -- probably the menu program here -- had adopted authority that was important for this program. USEADPAUT(*YES) would say to "use adopted authority if it's available from previous call levels". I suspect that for this program *OWNER authority would be sufficient and USEADPAUT(*YES/*NO) wouldn't make a difference. I see this parm used most often to specify *NO when there's a chance that previous call levels might pass on inappropriately high authority. For example, PGMA adopts QSECOFR and calls PGMB. Because PGMB displays a command line and the programmer wanted the command line to be tied to the job user rather than a previous program's owner, she set PGMB to USEADPAUT(*NO). Then PGMA's adopted authority is not used by PGMB. AFAIK, this value has no effect on USRPRF(*OWNER) adopted authority for the current program. (I'll gladly accept corrections.) Side note: Every once in a while, I have a need for a PRPADPAUT(*NO) -- propagate adopted authority -- setting. I have perhaps PGMA that runs under *OWNER but I don't want *OWNER passed to lower call levels. And since I don't own the programs called by PGMA, I have no say in whether they're USEADPAUT(*YES/*NO). Only thing I've thought of is to call an intermediary for every lower program and each intermediary is USEADPAUT(*NO). If there are better ideas, please pass them on. Tom Liotta -- Tom Liotta The PowerTech Group, Inc. 19426 68th Avenue South Kent, WA 98032 Phone 253-872-7788 x313 Fax 253-872-7904 http://www.powertech.com __________________________________________________________________ New! Unlimited Access from the Netscape Internet Service. Beta test the new Netscape Internet Service for only $1.00 per month until 3/1/04. Sign up today at http://isp.netscape.com/register Act now to get a personalized email address! Netscape. Just the Net You Need.
As an Amazon Associate we earn from qualifying purchases.
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.