Let’s say you needed to have 10 userprofiles setup for training.
A CL program you reveive the parm of 10
DCL vUsrprf *Char 10 Value(TRAINING’)
Then you code a loop to do a
CRTUSRPRF USRPRF(vUsrprf *Cat &n)
That works if you are creating “N” number of generic user profiles.
Some security people might take issue with it.
There is a lot more to a user profile than just the User ID. Job description, User class/special authorities and initial program or menu all usually have to specified when creating an account. Unfortunately, the original poster did not specify exactly what this is to be used for or why the accounts need to be created in a CL.
You should also be aware that the CL has to be run from an account that has *SECADM authority and at least *USE access to the CL program.