Assign a profile to users

Document ID : KB000074855
Last Modified Date : 03/04/2018
Show Technical Document Details
Question:
How can I assign a profile to a number of users?
Answer:
If you want to assign a profile to a number of users you can use the following TPXBATCH Job:

...
//EXT      DD   DSN=AAA.BBB.CCC,DISP=SHR
//RPT      DD   SYSOUT=* 
//SYSIN DD *
EXTRACT GIVING(EXT) USER AND NO SESSIONS (UIDXNAME(T-------)) 
ADD USERPROFILE USING(EXT) (name_of_profile) 
//


The EXTRACT-statement creates a file containing all users which should get the new profile added. In the above example these are all users whichs Userid begins with the letter 'T'.
The ADD USERPROFILE refers to the Extract-file and adds the named Profile to all users collected in the Extract-file.