iSeries SQL Exception Error -- Illegal argument of type -2

iSeries SQL Exception Error -- Illegal argument of type -2

Scenario:

Inbound x12 855 (PO Ack) is received and translated into JDEdwards E1 tables via SQL Insert (Database Adapter).

Issue:

The issue with the insert into the F47016 table, on the System I, is that the fields in the DB are using the CCSID of 65535. In order to insert into the F47016 table these fields must use a valid CCSID other than 65535, and in this case they should be using 37.

EXTOL error message:


ERROR [com.extol.adapters.jdbc.JDBCInteraction] JDBC Resource Adapter received a Standard Exception while attempting to SELECT: JDBC Resource Adapter received a Standard Exception: Exception occurred: Illegal argument of type -2 value 39057
Exception detail:
com.extol.util.message.StandardException: JDBC Resource Adapter received a Standard Exception: Exception occurred: Illegal argument of type -2 value 39057

java.lang.Exception: The value "39057" is not a valid UTF-8 hexadecimal value.
at com.extol.util.ByteArrayToHexString.cvHexStrToByteArr(ByteArrayToHexString.java:51)
at com.extol.adapters.jdbc.JDBCTypeMap.getSqlTypeByStringValue(JDBCTypeMap.java:513)

Resolution:

Use the ALTER TABLE to change the fields from CCSID 65535 to 37. You could also use the CREATE VIEW and cast all character fields as CCSID 37. The character fields using CCSID 37 will appear in the schema as character versus Binary field when the CCSID is 65535.



By: on
load('http://www.extol.com/extolnews.rss'); $feed = array(); foreach ($rss->getElementsByTagName('item') as $node) { $item = array ( 'title' => $node->getElementsByTagName('title')->item(0)->nodeValue, 'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue, 'link' => $node->getElementsByTagName('link')->item(0)->nodeValue, 'date' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue, ); array_push($feed, $item); } $limit = 4; echo ' A free web counter provided by GoStats.