#define ECONVERT 3490 /* Conversion error. */

A stream file CCSID setting can be set independently of the file's contents.

Try using DSPF STMF('filename').
It will sometimes help if seeing if the data inside the stream file is another ccsid.
DSPF will give you an info message if it has read the file and thinks the CCSID is different.

In the past I've see files get created as 1208, but then get 37 data written to them.

What is the open command used when outputting to the file?

Is it something like this?
// Open file for CCSID 1208 UTF-8 and setup to create file and convert text
Fd = Open(Filename
: O_RDWR +O_CREAT +O_CCSID +O_TRUNC + O_Textdata + O_Text_Creat
: M_RDWR : 1208 : 0);

What is the open command used when reading the file?

Is it something like this?
FD = Open(Filename
: M_RDONLY : 1208 : 37);

Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of James H. H. Lampert
Sent: Friday, August 11, 2017 1:22 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: ECONVR (errno=3490) on an IFS open() call?

I've got an RPG program accessing IFS STMFs (using techniques based on Scott Klement's ebook), and it was working perfectly as recently as this past March.

I've been informed (rather belatedly!) that it has stopped working, failing to open the STMFs it was opening just fine, a few months ago.

When I investigated, I added code to check the C errno after a failed open(), and it's coming back 3490, "econv."

The OFLAGS on the open are O_TEXTDATA + O_RDONLY; the STMF's CCSID is 1208.

Anybody got a clue what I should be looking for?

This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support by shopping at with our affiliate link:

This thread ...


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

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