Return value on AS400


Can anybody tell me the limit of error value returned on AS/400 system.
For MVS the limit is 0 - 4096.


Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


Error value returned for what? errno? SQL error values returned? Error values returned from an application program?

errno on V5R1 generally ranges 3001-3536, but those are the basic values #defined in errno.h. In V5R3, the range is 3001-3546.

Of course, the #defined values don't limit it. If the #defined range goes 3546, I would expect at least values to 4095.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
You need to know the application, eg. SQL, RPG, CPF etc.

In general error messages are in the format

where AAA is actualy 1 alpha and two alphanumerics and identifies the application, and sometimes a clue to the message file containing the message
and 9999 is a four digit number...  in hex: digits 0-9 and characters A-F

I would have said the limit is 0000-FFFF,  although generally 0001-9999    (although not all numbers are used)

Error messages are stored in MESSAGE FILES  (*MSGF).

You can create your own message file(s), and create your own message id's but the message id has to follow the above convention.

examples of IBM supplied message files (assuming you have the applications loaded) are
the list goes on and on and on......

try the command WRKMSGF   *LIBL/*ALL  
and choos option 12 to view messages....
eg. QSQLMSG has the following messages  
QMR0A1A - QMR2204
QMX0001 - QMX0191
SQL0004 - SQL9108
SQT0100 - SQT6842
SQ20054 - SQ20268
SQ30000 - SQ30107

NOTE that not all numbers in a range are used !! eg. QSQLMSG has the following extract
Message ID  Severity  Message Text                              
 QMR0A1A       10       Field value must be in the range 1 to 255.
 QMR0A1B       10       Field value must be in the range 22 to 378.
 QMR0A10       10       Field value must be in the range 1 to 4.  
 QMR0A11       10       Field value must be in the range 0 to 99.  
 QMR0A12       10       Field value must be in the range 0 to 999.
 QMR0A15       10       Field value must be in the range 0 to 15.  

notice messages QMR0A13 or QMR0A14 don't exist.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
IBM System i

From novice to tech pro — start learning today.