× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 16-Jun-2015 17:52 -0600, James H. H. Lampert wrote:
On 6/16/15 4:35 PM, CRPence wrote:
INSERT INTO test_file (BAR) VALUES( CAST('08 Bytes' as BINARY) )

Actually, if I do that, whether from STRSQL or from Squirrel, I get
Error: [SQL0332] Character conversion between CCSID 37 and CCSID 65535
not valid.

As I had said, draconian restrictions for mapping in and out of BINARY. However I do not recall ever experiencing that issue with literal\constants in the CAST as seen there; irrespective of the job CCSID. What release and fix level for that failure?


and if I change the job CCSID to 65535, then I don't get '08 Bytes' in
the field; I get 'F0 00 00 00 00 00 00 00'

Just keeps getting weirder.


Apologies. I forgot to specify the length attribute for the BINARY typing on the casting scalar, so the default size is for a 1-byte value :-( The revision:

INSERT INTO test_file (BAR) VALUES( CAST('08 Bytes' as BINARY(8)) )

I just tested on v5r3 with no difficulties, with job CCSID(37).


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2024 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].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.