× 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.



you need to do CHGJOB CCSID(37) or whatever your ccsid is before it can set
up a conversion table for you - It might also be the case for the C-API's
since it is the same it is using under the covers.



On Tue, Dec 21, 2021 at 8:57 PM Alan Shore via MIDRANGE-L <
midrange-l@xxxxxxxxxxxxxxxxxx> wrote:

Hi everyone
Just wanted to bring everyone up to date
I first found out how to read files in the ifs via RPG with the following
web page
https://www.rpgpgm.com/2016/03/a-better-way-to-read-file-in-ifs-with.html

about 12 to 15 months ago and have used it quite a few times in numerous
different projects

My latest situation has been solved by someone not in this e-mail group

The calculation of the open mode needed to be changed in the following
manner

OpenMode = 'r, o_ccsid=37' + x'00' ;

And the field OPENMODE had to be increased – I changed it to char(20)

And with this one change – there is no longer a problem in reading the ifs
files

Alan Shore
Solutions Architect
IT Supply Chain Execution

[NHScsignaturelogo]

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

From: John Yeung [mailto:gallium.arsenide@xxxxxxxxx]
Sent: Tuesday, December 21, 2021 9:46 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Cc: Alan Shore <ashore@xxxxxxxx>
Subject: Re: [EXTERNAL] Re: Reading a file in the IFS

On Tue, Dec 21, 2021 at 8:35 AM Niels Liisberg <nli@xxxxxxxxxxxxxxxxx
<mailto:nli@xxxxxxxxxxxxxxxxx>> wrote:

.. So if you see the same error for your file the use
CHGATR OBJ('/tmp/utf8error.txt') ATR(*CCSID) VALUE(1252)
.. to bring it back to window-1252 (latin-1)

I'd like to discourage people from thinking of Windows-1252 and
Latin-1 as the same encoding. By now everyone is probably familiar
with the "smart (curved) quotes" encoding problem.

Well, the difference between Windows-1252 and Latin-1, combined with
people mistakenly thinking they are equivalent encodings, is PRECISELY
why this problem occurs.

See

https://i18nqa.com/debug/bug-iso8859-1-vs-windows-1252.html<
https://i18nqa.com/debug/bug-iso8859-1-vs-windows-1252.html>

I will say that IBM and others "who should know better" don't help to
make this distinction clear, given that they are, at best, sloppy with
the terminology they use, even in apparently official published
materials.

John Y.
--
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.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.