Q
Problem solve Get help with specific problems with your technologies, process and projects.

Getting modules to adopt authorities from the main program

Using an AS/400 program with modules that do user profile maintenance? What if all the modules don't adopt the same authority, and thus abend? Ken Graap provides an elegant solution: set your modules to have adopt authority also.

I have a program with modules that does user profile maintenance. QSECOFR owns the main program and a "security" group has adopted authority to the main program. But there are two modules that do a CHGUSRPRF. These modules abend because the user does not have SECADM. I want the modules to adopt the authorities from the main program. How do I do that?
The easiest way to solve your problem is to set your modules (Service Program) to adopt authority too.
Assuming that the owner of your programs are QSECOFR…

The command you use to set your main program to adopt authority is CHGPGM. For example:

CHGPGM PGM(MYPGM) USRPRF(*OWNER)

The modules associated with the main program are service programs though and you will need to set them to adopt authority using the CHGSRVPGM command. For Example:

CHGSRVPGM SRVPGM(MODULE1) USRPRF(*OWNER)

CHGSRVPGM SRVPGM(MODULE2) USRPRF(*OWNER)

That's all there is to it….

Dig Deeper on Implementation

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close