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



Hi Douglas,

Make sure you're using O_TEXT_CREAT and doing it all with a single open() call. The "two opens" approach has never worked well with /QNTC.

fd = open( '/QNTC/whatever/whatever'
: O_CREAT + O_TRUNC + O_WRONLY
+ O_CCSID + O_TEXTDATA + O_TEXT_CREAT
: permissions
: 1252
: 0 );

Note that 1252 and 819 are almost identical. The difference is that 1252 has a few extra characters that aren't in the standard for iso-8859-1 -- they're Microsoft's extensions to the standard. So 1252 should work fine, and if your output is Windows, it's probably the "right" choice anyway.


Douglas Handy wrote:
I use Scott's IFS routines all the time (thanks!) for creating ASCII text
files with code page 819 in various folders of the IFS. Now what I want to
do is create a text file on a W2K server which has a link via QNTC.

I can create the file, but instead of getting the 819 code page like I
normally would with other IFS directories, WRKLNK shows the code page is
actually 1252. That may be fine -- other "text" files in that folder
(created on the server) are also listed as code page 1252. And when I
display the contents of the file via option 5 in WRKLNK, I see the right
text whether displaying my file created from RPGLE or any of the other files
in the folder. However, if I view my file from say Notepad on the server,
there is an obvious code page problem. The characters are all non-Latin
gibberish. All other files display fine.

Before using write() to put text in a file on a QNTC path, should I be
explicitly converting to code page 1252? Or should I be creating my file in
a different IFS folder, then copying my file to the QNTC share?

What is the best way to create a text file on a QNTC page with text readable
from Notepad or similar?


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.