Do you have an example of how to write a function which runs a CHGUSRPRF cmd to read the records in the outfile
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
monmsg cpf0864 EXEC (GOTO CMDLBL(END))
CHGUSRPRF PWDEXP(*yes) <– here is where you specify the change(s)
go to loop
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.
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.
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.