On 13-Oct-2015 09:28 -0600, rob wrote:
Sure would be nice to see the numeric value for
SQLSTATE=PAERR
then we could look up the numeric for PAERR.


The SQLSTATE is declared as CHAR(5), not as any numeric data type.

The onus is on the creator of the feature to document what are their possible *user-defined* Class Code value and Sub-Class Code value.

In this case, the failing feature was possibly proactive in that regard, and the following TechNote article was produced to document the failure:

[http://www.ibm.com/support/docview.wss?uid=nas8N1020591]
Reference #: N1020591
_IBM i NODEJS: Troubleshooting Recommendations Technote_ (troubleshooting)
"Problem(Abstract)

Nodejs for the IBM i is an open source product included in 5733OPS.
...
+ Error: SQLSTATE=PAERR SQLCODE=-1
...
Solution: Verify that we have these PTF installed on the System i:
..."

And FWiW:

The following search on the SQL-State messaging concepts
[http://www.ibm.com/support/knowledgecenter/search/sql error messages concepts?scope=ssw_ibm_i_72]

Leads to the following doc reference:
[http://www.ibm.com/support/knowledgecenter/api/content/ssw_ibm_i_72/rzala/rzalaco.htm]
"...
SQLSTATE values are comprised of a two-character class code value, followed by a three-character subclass code value. Class code values represent classes of successful and unsuccessful completion conditions. If you want to use SQLSTATE as the basis of your application's return codes, you can define your own SQLSTATE classes or subclasses using the following guidelines:

• SQLSTATE classes that begin with the characters 7 through 9 or I through Z can be defined. Within these classes, any subclass can be defined.
• SQLSTATE classes that begin with the characters 0 through 6 or A through H are reserved for the database manager. Within these classes, subclasses that begin with the characters 0 through H are reserved for the database manager. Subclasses that begin with the characters I through Z can be defined.
..."

The above shows that the class code "PA" is user-defined, so going to the KnowledgeCenter looking for that SQLSATE in a list of IBM i DB2 state values will not be fruitful.


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].