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



Do not confuse "buffer length" [aka number of bytes] with the number of characters for the data type [similar to how the number of digits and buffer length for Packed data type will not match]. The number of /graphic/ data type characters is 10. The example should remain as it was, and the existing file will show in DSPFFD, like from DSPFFD QTEMP/P2 from the example:

Data Field Buffer
Field Type Length Length
G GRAPHIC 10 20
Coded Character Set Identifier . . . . . : 13488
UCS2 or Unicode conversion . . . . . . . : *CONVERT

The "Field Length" of 10 indicates the number of characters. The CCSID and *CONVERT indicates that although internally stored as UCS2, the data will be converted into the job CCSID [thus the requirement for CHGJOB CCSID(37) in the example. Thus the comparison is 10-characters against 10-characters.

A VIEW could be defined to force the mapping there, but why? Just make the comparison. For my example, it is possible to map the field to char(10) with the given CREATE VIEW:

chgjob ccsid(*hex)
strsql
create table qtemp.p2 (g graphic (10) ccsid 13488 not null )
insert into qtemp.p2 values('20070816')
create view qtemp.v2 ( g ) as
select cast(g as char(10) ccsid 37) as g
from qtemp.p2
select * from qtemp.v2 /* works */
select * from qtemp.p2 /* Yuck! *HEX says _do not xlate_ */

Regards, Chuck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.