If you extend your error data structure ds_Error out beyond the Error Id,
the message data is returned there in the data structure defined by the
message.

On Thu, Oct 11, 2018 at 3:14 PM Mohan Eashver <mohankva@xxxxxxxxx> wrote:

Hello Good afternoon,

This API validates if new password matches the security rules.
And returns an error message (if there is one) in an DS_Error

User enters an invalid password. Then the API returns the message Id
"CPF4AA7" in DS_Error.ErrorId

I know how to get the message text using RTVMSG.
But how can i get the *Message DATA Field value for &1 *part of the message
?

For example CPF4AA7 has this Message Text and value of &1 could be 16.
And value of &2 could be *MIXCASE1.

Message . . . . : Password value not valid. Reason code &1.

Cause . . . . . : The specified password value does not conform to the

password composition rule &2 specified by the QPWDRULES system value.
The
reason code indicates the problem that was detected with the password
value:

[image: image.png]


Here is my text version of RPG program :

d changePW PR EXTpgm('QSYCHGPW')
d @userid 10
d curpw 10
d newpw 10
d error 15

d ds_Error Ds 15
d BytesProvided 10I 0 inz(%size(ds_Error))
d BytesAvail 10I 0
d ErrorId 7

c callp changePW( userid :
c curpswd :
c newpswd :
c ds_error )
----
Regards,
Mohan Eashver
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].