If you are planning a major upgrade of your application software where shutting down the interactive subsystems...
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
is not an attractive option, but you don't want to limit access to the programmers or QSECOFR, this application will do what you want. The program DIS_USR will disable all enabled profiles who are not programmers, security officers, security administrators, IBM-supplied profiles or system operators and write the profiles to the file GOODUSER. When your upgrade is complete and you are ready to let the users back in, simply run ENA_USR to re-enable only the ones you disabled. This keeps you from re-enabling profiles that you have disabled for legitimate reasons.
Note that in DIS_USR, profiles that start with the letters ?Q_? WILL be disabled (on our system, users have profiles which are their first initial, the underscore, and their last name). You might want to review the method of selection here and modify it to suit your own needs.
NOTE: Before compiling this program, the output file from the command DSPUSRPRF USRPRF(any_valid_profile) TYPE(*BASIC) OUTPUT(*OUTFILE) OUTFILE(your_lib/ALLUSER) must exist. Also, the file GOODUSER (see DDS below) must exist for both DIS_USR and ENA_USER to compile.
Click here to view the code: RPG Program DIS_USR
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Ask your programming questions--or help out your peers by answering them--in our live discussion forums.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.