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



The original environment describes a mixed character encoding where the results are correct. The ASCII 0x09 is the Tab character which maps to the EBCDIC 0x05 Horizontal Tab (HT) character.

http://www-03.ibm.com/servers/eserver/iseries/software/globalization/controlcodes.html

If that is understood, yet the original intent from the OP is not progressed by that comment, some more comments that might be worth review...

Using "rb" giving more than one line is also correct because binary data can not have line control characters, since no byte should be interpreted as anything other than the code point it is. However, I believe "type=record" may be used to /trick/ binary open to treat the data as record oriented; that may require using fread() instead.?

Since apparently the stream file is tagged with CCSID 1252, then the concern can be resolved by specifying on the open "o_ccsid = 1252".

For either case above, the program that reads the data, if that program will also write the concatenated data, it must only concat data which has already been converted to the CCSID(1252) in order to maintain the integrity of the STMF having been tagged with that encoding. That is, for the string 'ROSE' in EBCDIC to be appended to the 0x0109, the x'D9D6E2C5' must be converted to the ASCII x'524F5345' before writing that full string x'0109524F5345'.

http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c415607107.htm#HDRFOPEN
see "Keyword parameters for Integrated File System only"

Regards, Chuck

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.