Here's the basic gist:
1) My user profile has a user class of *PGMR and user group GRPTEST.
2) GRPTEST is a group for programmers (as well as "test" users for training purposes). It has *USE authority to production librs so programmers don't accidently do a clrpfm or something similar on a production libr.
3) The code below is a procedure to delete the test libr and restore it again from the most recent backup.
4) When I create the program that does the procedure (see #3), this is how it's done:
This program is created with user profile QSECOFR.
5) When I try to run SETUPTEST with my user profile, it allows me to delete the libr but it blows up saying "not authorized do a RSTLIB." Doesn't CHGPGM mean the person is running the program "as if" they were QSECOFR?
6) My main goal is to be able to run the procedure with my user profile. I try to avoid signing on as QSECOFR whenever possible.
1) My user profile has a user class of *PGMR and user group GRPTEST.
2) GRPTEST is a group for programmers (as well as "test" users for training purposes). It has *USE authority to production librs so programmers don't accidently do a clrpfm or something similar on a production libr.
3) The code below is a procedure to delete the test libr and restore it again from the most recent backup.
Code:
DLTLIB TESTLIB RSTLIB SAVLIB(PRODLIB) DEV(TAP01) RSTLIB(TESTLIB) GRTOBJAUT OBJ(TESTLIB) OBJTYPE(*LIB) USER(GRPTEST) + AUT(*ALL) GRTOBJAUT OBJ(TESTLIB/*ALL) OBJTYPE(*ALL) + USER(GRPTEST) AUT(*ALL)
Code:
CRTBNDCL MYLIBR/SETUPTEST SRCFILE(MYLIBR/QSRC) CHGPGM MYLIBR/SETUPTEST USRPRF(*OWNER)
5) When I try to run SETUPTEST with my user profile, it allows me to delete the libr but it blows up saying "not authorized do a RSTLIB." Doesn't CHGPGM mean the person is running the program "as if" they were QSECOFR?
6) My main goal is to be able to run the procedure with my user profile. I try to avoid signing on as QSECOFR whenever possible.
Comment