15 pts.
 Change Initial Program
how do you change the initial program and library for all user profiles preferrably using SQL.

Software/Hardware used:
iseries vr51
ASKED: August 25, 2011  5:17 PM
UPDATED: March 31, 2012  5:33 PM

Answer Wiki:
You can write a program that will read through a list of all USRORFs and do the CHGUSRPRF command Or, since this is probably a one time deal, I would do these steps: 1. Signon with a USRPRF that has the appropate authority 2. WRKOBJPDM QSYS 3. Use F17 and make Object Type = *USRPRF 4. Put '2' on the first Opt line in the SFL 5. do F13 6. go down to the "Parameters or command" line and key-in INLPGM(yourlib/yourpgm) 7. ENTER -- using this technique you end up hitting enter once for each USRPRF. * Another option is to create your own PDM option Do steps 1,2 3 4. F16 5. F6 6. Option any calue you want. Command: "CHGUSRPRF &N INLPGM(yourlib/yourpgm) 7. ENTER 8. ENTER 9. Put the value you set for yout PDM option on the fist SLF line 10. F13 11. ENTER
Last Wiki Answer Submitted:  August 25, 2011  7:35 pm  by  CharlieBrowne   32,855 pts.
All Answer Wiki Contributors:  CharlieBrowne   32,855 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Thanks Charlie. Good Stuff.

 15 pts.

 

If you want to do it with SQL, you can use the SQL CALL statement to call the system QCMDEXC API to execute a CHGUSRPRF command for each user. Because QCMDEXC has no output parameters, it can be called as a stored procedure even when it is not registered to the database.

Tom

 108,055 pts.