We have some user profiles that we keep disabled until they call and tell us they need to sign on. I would like to be able to call a CL program that will prompt me to enter a time in minutes that they will need the system. It would then enable the necessary user profile, and once the amount of time entered had passed, the user profile would be disabled. If anyone knows a way of doing this, I would appreciate it very much.
To enable a profile, and disable it at a particular time, you can use the command CHGACTSCDE(Change Profile Activation Schedule Entry).
For example, to enable the profile BOB from 11:00 am, and disable it at 5:00 pm, on Wednesday, you could use the following command.
CHGACTSCDE USRPRF(BOB) ENBTIME('11:00') DSBTIME('17:00') DAYS(*WED)
However, if you do not remove this schedule entry, the profile will be enabled each Wednesday at the specified time. So, you will manually need to remove the entry after each usage.
To remove a user profile from the schedule, run the command:
CHGACTSCDE USRPRF(BOB) ENBTIME(*NONE) DSBTIME(*NONE) DAYS(*WED)
Whether that's easier than running the CHGUSRPRF command twice -- one to enable and once to disable -- is up to you.
You should note, that even though you disable a user profile, any job using that profile currently active or on a job queue will not be effected. (i.e. It will not kill jobs, even though you disable the profile.)
Your other option is to write a CL program or two that will process the enable and disable for you.
MORE INFORMATION ON THIS TOPIC
The Best Web Links: Tips, tutorials and more.
Search400.com's targeted search engine: Get relevant information on security.
Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.
Read this Search400.com Featured Topic: Secure your iSeries