15 pts.
 Mass change on user profiles
Is there an easy way to do a mass change on user profile fields.  We have approx 6000 user profiles and need a way to programmatically change

Software/Hardware used:
ASKED: September 27, 2011  11:16 PM
UPDATED: March 31, 2012  1:06 AM

Answer Wiki:
run a DSPUSRPRF to an outfile, and write a function which runs a CHGUSRPRF for each record, according to what you wish to do. You will need appropriate security to do this.
Last Wiki Answer Submitted:  September 28, 2011  7:07 am  by  Yorkshireman   5,505 pts.
All Answer Wiki Contributors:  Yorkshireman   5,505 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


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


 

Do you have an example of how to write a function which runs a CHGUSRPRF cmd to read the records in the outfile

 15 pts.

 

Issues –

    DANGER

you will change every profile that is in the file if you have authority to change them INCLUDING QSYSOPR, and other critical profiles.

Authority issues apply.

Here is a rough draft of the cl program

DCLF myfile

loop: rcvf
monmsg cpf0864 EXEC (GOTO CMDLBL(END))

CHGUSRPRF PWDEXP(*yes) <– here is where you specify the change(s)
go to loop
END: ENDPGM

 44,630 pts.

 

command should be ….

CHGUSRPRF &UPUPRF … with keywords and values to change it to

&UPUPRF is the field from the file you created of user profiles.

Phil

 44,630 pts.

 

You might use Management Central in iSeries Navigator.

Right-click the Endpoint. Select Users and groups-> Edit users… Click the Browse button and select all user profiles you want to change. Pick the Category, then select the Setting you want to change. Click the Properties button to enter the setting value. (The Properties button is in the right-hand margin in my window.)

After you have all Settings/Properties set, click the OK button.

Tom

 110,175 pts.

 

In your outfile, run a QRY over it to leave out IBM, and other profiles you don’t wish to change.

 3,175 pts.

 

1. DSPUSRPRF *ALL OUTPUT(*OUTFILE) OUTFILE(lib/file)
2. Run SQL or QRY to create a new file with just the user profiles you want to change.
3. DCLF lib/file
4. DCL variables for the changes you want to make and set their Initial value.
5. loop through you file to you come to EOF.

 3,175 pts.