Hi Guys can any ne help me I am new to CL

0 pts.
Tags:
AS/400
I am trying to change audit for the user who are having *secadm authority CHGUSRAUD user(xxx) OBJAUD(*ALL) AUDLVL(*CMD) can any one help how to write CL for this. i have tried this PGM DCL &USER *CHAR 12 DCLF FILE(UTHOTA/AIR) OVRPRTF FILE(QPSECUSR) HOLD(*YES) SAVE(*NO) PRTUSRPRF TYPE(*AUTINFO) SPCAUT(*SECADM) CPYSPLF FILE(QPSECUSR) TOFILE(UTHOTA/AIR) DLTSPLF FILE(QPSECUSR) RUNQRY QRY(UTHOTA/ADM1) CPYSPLF FILE(QPQUPRFIL) TOFILE(UTHOTA/SECOFR) DLTSPLF FILE(QPQUPRFIL) RCVF MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(EOF)) IF COND(&USER = 'SMITHAR') THEN(CHGUSRAUD + USRPRF(&USER) OBJAUD(*ALL) AUDLVL(*CMD)) ELSE CMD(GOTO CMDLBL(EOF)) EOF: ENDPGM
ASKED: August 22, 2005  10:26 AM
UPDATED: August 22, 2005  12:31 PM

Answer Wiki

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

Your best bet is to execute the following command:

DSPUSRPRF USRPRF(*ALL) OUTPUT(*OUTFILE) OUTFILE(yourlib/USERFILE)

This creates a file with basic information for each user on your system. Use this file in your DCLF and get rid of the CPYSPLF and other code. On each record is a 150 byte field that contains all special authorities concatenated together. Scan the field for a value of *SECADM (you can use the QCLSCAN API). If you find the string then run your CHGUSRAUD against the user profile name on the record.

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