Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tip: Error 0940 RC X'00000004' when entering new password that is not in valid format

72 views
Skip to first unread message

Bob Moellenberndt

unread,
Oct 7, 2003, 12:42:23 PM10/7/03
to
Tip: Error 0940 Reason Code X'00000004' when entering new password that is
not in valid format
VisualRPG version: V5R1M1
Application type: Windows

Here is an error that we have encountered that is not well documented.
Thought this might save someone else some time trying to figure it out.

When a staff member logs in to the AS/400 (iSeries) server through a
VisualRPG Application and that person's password has expired, the VRPG
program displays an alert that the password has expired and provides a
window to enter a new password.

However, if the person then enters a new password that is not in a valid
AS/400 format, such as one that starts with a number, an error occurs.
Rather than tell the person that this new password is not valid, the VRPG
program returns the following error message and the person is forced to
terminate the component:

0949 Error occurred in host services with reason code X'00000004'.

To further add confusion, the list of reason codes displayed with the error
does not include reason code X'00000004'. The staff member (and the
programmer) is left guessing what the problem is.

It would be nice if VRPG would trap this error, like the CHGPWD command does
that is used with the conventional "green screen" sign-on, and return a
message window with a text explaining the problem. At least it would be
helpful to have text for reason code X'00000004' with the 0940 error
message.

But for now, if you encounter this error just print out the full text of
error message CPF5222 for the staff person. It is a good guide for what is,
and is not, a valid AS/400 password. Armed with this information, the person
can then retry the Sign-On operation.

Also, be aware that their user profile may have been disabled by too many of
these failed sign-on attempts. Each time the VRPG change password fails and
the 0940 message is issued counts as a failed Sign-On. If the profile has
been disabled they will see a message when trying to sign-on that says:
Invalid user ID or password specified.

Bob Moellenberndt
Door County Courthouse

===================================================
IN THE LIST IF REASON CODES DISPLAYED WITH ERROR 0940,
NO TEXT IS INCLUDED FOR REASON CODE X'00000004' :
------------------------------------------------------------------------
0940 Error occurred in host services with reason code X'00000004'.
Cause . . . . . : An error has occurred while using a host service.
The following reason codes may be returned:
X'00000001' -- A communications failure has occurred.
X'00000002' -- A DDM failure has occurred.
X'00000003' -- Internal failure within the Host Services component.
Contact your service representative.
<----- no text for reason code X'00000004'
X'00000007' -- One or more input parameters for the Host Services API was
too big to be properly processed.
X'00000008' -- A data translation to or from an unsupported CCSID was
requested.
X'00000009' -- Invalid sign for zoned/packed number.
etc ...
===================================================
MESSAGE TEXT FOR CPF5222
-----------------------------------
Display Formatted Message Text
System: DC400
Message ID . . . . . . . . . : CPF5222
Message file . . . . . . . . : QCPFMSG
Library . . . . . . . . . : QSYS

Message . . . . : Name is not valid.
Cause . . . . . : Field validation error - incorrect name was entered.
Recovery . . . : The name must start with an alphabetic character
followed
by any of these characters: 0-9, A-Z, @, $, # and underscore (_).
Numeric passwords must be preceeded by the letter Q. For example, if the
password is to be 1234, it must be entered on the CHGPWD (Change Password)
screen as Q1234.
Press the Reset key and correct the name.

0 new messages