|
Do you need to reopen it?Try to remove O_TEXTDATA , probably it triggers
some sort of auto conversion hitting maybe some problem in such very old
release.Or do all normally in RPG, and then try to use some command like
CPY ? It should have CCSID from-to.
On Tuesday, December 2, 2025 at 04:00:48 PM GMT+1,
konsult@xxxxxxxxxxxxxxx <konsult@xxxxxxxxxxxxxxx> wrote:
I need to create a file in the IFS and the file HAS to be encoded in UTF-8
(CCSID 1208).
The machine is unfortunately running on V7R1 and that is due to a software
package that cannot (as I am told be migrated to more current releases). So
writing with SQL is out of the equation, sadly.
I have tested a function based on Scott Klements writings and while it
works
with conversion to ASCII it fails when I change to CCSID 1208.
As per the example the IFS file is first created with 1208 as the CCSID.
This works and is coded thus:
c eval fd = open('/home/ao/ch5_file3.txt':
c O_CREAT+O_WRONLY+O_CCSID:
c S_IWUSR+S_IRUSR+S_IRGRP+S_IROTH:
c 1208)
But when the file is closed an reopened this open gets an error:
c eval fd = open('/home/ao/ch5_file3.txt':
c O_WRONLY+O_TEXTDATA)
I receive an "open() conversion error"
Any suggestions? I assume that I need some other parameters for the second
open when using UTF-8 but I have as yet not found which one to use or
possibly omit.
--
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.
--
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.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.