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



Bobby, well, I tried this small SQLRPGLE program. I built a PF with one
CHAR(80) field with CCSID(65535). i populated the field with 'Company
Inquiry' expressed as
X'436F6D70616E7920496E7175697279'

Please see the program. When you run this in DEBUG mode, you can see that
variable textVal is in effect translated into the text you want to see
followed by a lot of "@" which in EBCDIC are HEX 40 but in ASCII they are @
signs.

I have been unable to replicate this in sql scripts. I get the same error
as yours.

Javier.


// The RPG program
ctl-opt dftactgrp(*no) actgrp(*caller);

dcl-pi hextext01;
end-pi;

dcl-s textVal char(80) ccsid(819) inz;

*inlr = *on;
exec sql select hexfld into :textVal from hextbl;

if sqlcode = 0;
else;
endif;


El lun, 12 dic 2022 a las 12:59, Bobby Adams (<bobby_adams@xxxxxxx>)
escribió:

I apologize for my delay in responding to the suggestions. I have tried
them but they didn't work. However, I think I may not have described
the problem completely.

In this vendor file the field is assigned the CCSID 65535. Here is the
first few bytes of that field for one of the records using DSPPFM.

ä?_ø/>` ñ>ÉÍÑÊ`
466766724677677
3FD01E909E15929

Company Inquiry

If you take it one byte at a time and use the hex values 43, 6F, 6D, 70,
etc., and use a handy ASCII chart the character value comes out to be
'Company Inquiry'. Is there a way, with an SQL Select, to show "Company
Inquiry" instead of the special characters "ä?_ø/>` ñ>ÉÍÑÊ`"?

Thanks in advance.

Regards,

Bobby


On 12/6/2022 16:42, Bobby Adams wrote:
Hi All,

There is a vendor file that has a field with CCSID 65535 assigned.
Can SQL convert that field to CCSID 1208? I am asking about SQL
because the person who will be working with the file prefers SQL.

When we try to CAST it to 1208 we get '[SQL0332] Character conversion
between CCSID 65535 and CCSID 1208 not valid.'

Thanks in advance.

Regards,

Bobby

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com


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.