Mass disable/enable of user profiles

If you are planning a major upgrade of your application software where shutting down the interactive subsystems 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


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.

This was first published in May 2002

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.