|
I need to grant a group profile for some software. I have a short CL
Program to receive the list of users with a parm for the group profile I
wish to add. In the CL I'm first trying to add a supgrpprf and if there is
no group profile it will then add the parm as the group profile. This
works fine if the user already has a group profile and no supgrpprf. But
if there is already one of each, then the original supgrpprf will be
replaced by the parm. Is there a way to add a group profile instead of
overwriting the original one?
For those interested, I have pasted my CLPGM - I'm no programmer by the way.
Thanks for any help,
Chris Whisonant
/* GRANT GROUP PROFILE */
PGM PARM(&USER)
DCLF FILE(MYLIB/GRPLIST)
DCL VAR(&USER) TYPE(*CHAR) LEN(8)
MONMSG MSGID(CPF0000)
/* RECEIVE FILE GRPLIST AND GRANT GROUP PROFILE */
GETREC:
RCVF
MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(ENDOFFILE))
MONMSG MSGID(CPF4101 CPF0860 CPF4131) EXEC(GOTO +
CMDLBL(EXIT))
CHGUSRPRF USRPRF(&GRPLIST) SUPGRPPRF(&USER)
MONMSG MSGID(CPD22B2 CPF22CD) EXEC(GOTO +
CMDLBL(ADDGRPPRF))
GOTO CMDLBL(GETREC)
ADDGRPPRF:
CHGUSRPRF USRPRF(&GRPLIST) GRPPRF(&USER)
GOTO CMDLBL(GETREC)
ENDOFFILE:
EXIT:
ENDPGM
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.