× 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 Fri, 27 Oct 2006 16:06:22 -0500 (CDT)
 Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx> wrote:

If I choose to use iConv to convert the data, how do I
set
the ccsid of the file?  Is that possible with the
open()
API?

CCSIDs were introduced into the IFS in V5R1.  Prior to
that time, there 
was no CCSID flag to set.  (There was a code page, but
not a CCSID)

If there's no CCSID field, then you can't set it :)

Instead, you'll have to set the code page.  You can set
it by specifying 
O_CODEPAGE one the open() API when the file is created.
 (But don't 
specify O_TEXTDATA, which causes translation, just
O_CODEPAGE to assign 
the code page.)

Alternately, you can set it Qp0lSetAttr() API.

Thanks, Scott.

I was actually referring to making it "work" on V4R5 and
up, so doing it one way for all versions.  I can set the
code page but what about machines running V5R1 and up?  And
what code page do I use?  I can't find a table anywhere
that has a cross reference from Code pages to CCSIDs.

Sorry, I'm not explaining the problem very good I don't
think.  :)  This has to work on V4R5 and up.  Hopefully
without having to check for an OS version.


-- 
This is the RPG programming on the AS400 / iSeries
(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.


Bradley V. Stone
BVS.Tools
www.bvstools.com

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.