× 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 all,

Hope your holidays are going superbly!

Meanwhile, I am unsuccessfully trying to write a UTF-8 file on the IFS.
That's what I have done:

- the job is running with CCSID(280) inherited from QCCSID
- the HTTPCLOBVERBOSE SQL function returns UTF-8 data (which I want to
save) into a CCSID(1208) variable:
- dcl-ds http inz; // http call
...
responseMsg sqltype(CLOB: 2000000) inz ccdid(1208);
// http response utf-8 message
...
end-ds;
- this is the definition of a temporary variable
- dcl-s pdfDataFinal like(http.responseMsg); // same dimension
as http body
response
- this is the definition of the IFS destination
- dcl-s ifsPdfFile sqltype(CLOB_FILE) ccsid(*utf8); // I tried 1208
as well
- this is how I create the file
- pdfDataFinal = %trim(http.responseMsg);
// some stuff here
ifsPdfFile_NAME = %trim(fileFullPathName); // file name
ifsPdfFile_NL = %len(%trim(ifsPdfFile_NAME)); // name length
ifsPdfFile_FO = SQFOVR;
// SQFOVR= override, SQFCRT=create, SQFAPP=append, SQFRD=read-on
- so far so good, then I create the file:
- exec sql set :ifsPdfFile = trim(:pdfDataFinal);
- and the file in IFS is CCSID(280), no matter what! The receiving
folder is coded 1208, but the newly created file in the folder is 280 (seen
from WRKLNK).

Looking at the compilation spool file I looked at the variable definition:
227 //*DCL-S IFSPDFFILE SQLTYPE(CLOB_FILE) CCSID(*UTF8); // CCSID UTF-8

228 DCL-DS IFSPDFFILE;
//SQL
229 IFSPDFFILE_NL UNS(10);
//SQL
230 IFSPDFFILE_DL UNS(10);
//SQL
231 IFSPDFFILE_FO UNS(10);
//SQL
232 IFSPDFFILE_NAME CHAR(255) CCSID(1208);
//SQL
233 END-DS IFSPDFFILE;
//SQL

It seems to me that only the file name has the CCSID UTF-8 set, not the
content, though the data part of the variable is not explicit.

I tried changing the CCSID of the running job to 1208, but it revealed
impossible, but I couldn't find any other documentation.

Does any of you know how to do this?

Thank you very much
Kind regards
Lucia


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.