RTVUSRPRF command in OS/400 CLP

pts.
Tags:
Security
I'm trying to use the RTVUSRPRF to copy information from one user profile to another. The SPCAUT is not coming over because of a CPD00084 error. It does not recognize ' ' for an entry. When a user has all 8 entries in the SPC list it works fine. Just when there are less than 8. Thank you for your time and help

Answer Wiki

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

One simple possibility because you haven’t described exactly how the [”] value is being used as an ‘entry’… An entry for what? There’s no reasonable way to specify it as an entry for the RTVUSRPRF SPCAUT() parameter, so I assume you mean the CRTUSRPRF SPCAUT() parameter.

For CRTUSRPRF, the value from RTVUSRPRF cannot be used directly. The CRTUSRPRF SPCAUT() parameter is a list parameter while the RTVUSRPF SPCAUT() parameter is a single *CHAR (100) variable, not a list.

The value from RTVUSRPRF must be parsed into all of the individual special authorities. When there are fewer than eight, you end up with the entries at the end of the list being [”] or practically null since they’re just blanks.

The simple fix is to test each entry as it’s parsed from the string; when an entry equals all blanks, just replace it with [’*N’]. The value [’*N’] can almost always be used as a kind of null placeholder for any parameter value. That’s just how commands are allowed to be constructed; very handy for cases such as yours.

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