Need a CL to enable vendors userids on the AS/400

5 pts.
Tags:
AS/400 administration
AS/400 Control Language
AS/400 user administration
CL/400
We have a robot job the disables vendor userids at 18:00 and 06:00 respectivley. Would like to write a CL to enter in a list of ids that need to be enabled and run the job. Instead of enabling each id each morning. Sometiimes there can be quite a few on 4 different systems. Please help.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,

I think your best option would be to create a data file with a list of the user IDs that need to be re-enabled, then read the data file in a CL program (using DCLF & RCVF). For each of the User ID’s that you read do a CHGUSRPRF *ENABLE.

PGM

DCLF USERIDS

READ: RCVF
MONMSG MSGID(CPF0864) EXEC(GOTO ENDPGM)
CHGUSRPRF USRPRF(&USERID) STATUS(*ENABLED)
GOTO READ

ENDPGM: ENDPGM

This assumes that you have a field called USERID in a file called USERIDS.

Regards,

Martin Gilbert.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

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

Forgot Password

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

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

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

Thanks! We'll email you when relevant content is added and updated.

Following