Thanks for your reply Scott
I'm not looking to change the ccsid
I'm trying to work out why I'm getting the error on the open
My guess was that this was due to the ccsid
But as stated, it was a guess as I am unable to find anything on the Web

Sent via the Samsung GALAXY S® 5, an AT&T 4G LTE smartphone

-------- Original message --------
From: Scott Klement <midrange-l@xxxxxxxxxxxxxxxx>
Date: 12/20/21 22:18 (GMT-05:00)
To: midrange-l@xxxxxxxxxxxxxxxxxx
Subject: [EXTERNAL] Re: Reading a file in the IFS

Hi Alan,

I don't understand the question about changing the CCSID. What CCSID
are you trying to change? Typically, it converts from the CCSID of the
file to the CCSID of the job... You don't change the CCSID of the file
on fopen(), instead that would be done with the CHGATR CL command or the
setccsid QShell command. You'd do this before opening the file. Do you
want to change the CCSID that your program reads into instead of using
the job ccsid? If so, you can use the o_ccsid option on the fopen() call.

But... changing o_ccsid won't solve the problem.

The problem is that the file contains a string of bytes that's not valid
in UTF-8. UTF-8 requires bytes to be encoded in a particular way, and
you have a sequence of bytes that isn't valid by UTF-8 standards, so you
get the error.

Perhaps the file isn't actually UTF-8? Perhaps it's 819, or 1252, or
something else?

If this doesn't help, please provide more information. We need to know
how to reproduce the problem in order to truly tell you what's
happening. To facilitate that, give us a sequence of bytes that we can
place in a stream file, and then give us the exact parameters you're
using to fopen() so we can recreate the problem.

Good Luck!

On 12/20/2021 4:34 PM, Alan Shore via MIDRANGE-L wrote:
Hi folks
We are on V7r3
With the help of this group, I am using the

For about a year now, and once I was told of what I was doing wrong, with no problems
Until now
I am using these functions for a new set of ifs files, and am receiving
C_ERRNO = 3490 which translates to an error string of 'Conversion error.'
On the _C_IFS_fopen finction

I believe it MAY be the ccsid of the ifs files that I am attempting to open - CCSID = 1208
Everything I have used these functions on up until now have been CCSID = 819 without incurring this problem'
I have tried to googel the answer to this but having little success
Is there anywhere in the function parameters that I can change the CCSID on the _C_IFS_fopen function?
If anyone can point me to where the write up to these functions can be found will be greatly appreiated

Alan Shore
Solutions Architect
IT Supply Chain Execution


60 Orville Drive
Bohemia, NY 11716
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
E-mail : ASHORE@xxxxxxxxxxxxxxxxxxxx

'If you're going through hell, keep going.'
Winston Churchill

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,
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.

Help support by shopping at with our affiliate link:<>

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by 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.