hi

0 pts.
Tags:
AS/400
Database
am trying to change audit for the user who are having *secadm authority CHGUSRAUD user(xxx) OBJAUD(*ALL) AUDLVL(*CMD) could you please help how to write CL for this. i have tried this PGM DCL &USER *CHAR 12 DCL &S *CHAR 2 DCLF FILE(xxxx/AIR) OVRPRTF FILE(QPSECUSR) HOLD(*YES) SAVE(*NO) PRTUSRPRF TYPE(*AUTINFO) SPCAUT(*SECADM) CPYSPLF FILE(QPSECUSR) TOFILE(abcd/AIR) DLTSPLF FILE(QPSECUSR) RUNQRY QRY(xxxx/ADM1) CPYSPLF FILE(QPQUPRFIL) TOFILE(kraa/SECOFR) DLTSPLF FILE(QPQUPRFIL) RCVF MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(EOF)) IF COND(&S = X ) THEN(CHGUSRAUD + USRPRF(&USER) OBJAUD(*ALL) AUDLVL(*CMD)) ELSE CMD(GOTO CMDLBL(EOF)) EOF: ENDPGM
ASKED: August 31, 2005  11:14 AM
UPDATED: November 4, 2009  6:46 AM

Answer Wiki

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

The field names for the file (xxxx/AIR) are automatically declared to the CL (I am assuming that they are S and USER) If they are then just remove the DCL statements for these and it should work. If they are not then just prefix the actual names with & and use them instead.

========================================================

First, get rid of all processing of spooled files. There is no need to process the QPSECUSR or the QPQUPRFIL spooled file. There are almost always better, faster and simpler ways of doing it. Further, it’s almost always closer to be certain to be correct if you do it in more correct ways.

Since you’re a beginner at CL programming, the best start for you will be:
<pre>
DSPUSRPRF USRPRF(*ALL) OUTPUT(*OUTFILE) OUTFILE(QTEMP/XXXXXX)</pre>
List the user profiles to a real output file and read that file in your CL program. Don’t try reading a spooled file.

Tom

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