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 Yorkshireman5,505 pts.
All Answer Wiki Contributors: Yorkshireman5,505 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
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.
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.
Do you have an example of how to write a function which runs a CHGUSRPRF cmd to read the records in the outfile
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
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
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
In your outfile, run a QRY over it to leave out IBM, and other profiles you don’t wish to change.
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.