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



Hi Darren,

Do a "dspsysval qccsid" to see what your CCSID is. I believe the default is 65535. We changed our system to use 37. The problem with 65535 is that it doesn't allow translation to a non-i system (there's probably a better way of saying it).

From this document:
https://www-304.ibm.com/support/docview.wss?uid=nas1424b54dc5ddb1790862565c2007cc019
"When transferring data across platforms, the CCSID is used to determine how the data is handled during the transfer. US English uses 037, Multilingual is 500, but 65535 by definition implies that there is no character set associated with binary data."

I hope this helps,

Kurt Anderson

-----Original Message-----
From: rpg400-l-bounces+kurt.anderson=customcall.com@xxxxxxxxxxxx [mailto:rpg400-l-bounces+kurt.anderson=customcall.com@xxxxxxxxxxxx] On Behalf Of darren@xxxxxxxxx
Sent: Friday, October 07, 2011 3:11 PM
To: midrange-RPG RPG message board
Subject: SQL to IFS wrong CCSID


I'm trying an example of some code I saw, which writes a message to an IFS directory. It works great when looking at the file from the i, but if I open it with a Windows program, such as Notepad, it looks like garbage...indicating that I have a character set issue. Is there a way to have this file written in a PC character set? I notice that if I create the file through windows, in the IFS, that the program replaces the file with the correct character set, and I can read what it writes in Windows.

H ActGrp(*CALLER) DftActGrp(*NO) ExprOpts(*RESDECPOS) DatFmt(*USA)
H OPTION(*SRCSTMT:*NODEBUGIO) EXTBININT(*YES)
//
D Doc S SQLTYPE(CLOB_FILE)
D CRLF S 2 INZ(X'0D25')
//****************************************************************
// Begin Calculation Specifications
//****************************************************************
/FREE

clear Doc;
Doc_Name='/tmp/TEST.txt';
Doc_NL=%len(%trim(Doc_Name));

Doc_FO=SQFOVR;
exec sql set :Doc='This is test record 1';

*InLR = *On;
Return;

--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.


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.