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



On 3/9/11 12:32 PM, Dennis wrote:
<<SNIP>>
The reason I noticed this is that I sent a file like this to a
Windows system using ASCII mode, and the Windows system shows no LF
(of course), and instead views it as one streamed line.

What would be the appropriate CCSID for me to use for such an
operation? Following on to that, should I (not) be able to specify
one CCSID for most purposes and be done with it (assuming I'm only
using IBM i, Windows and Linux systems in US English)? Or is CCSID
even the problem?!?!
Maybe I should be using something other than "...\n" in my
printf() ?

While *nix [and emulation] might be happy with the effects as coded, I think for output sent to Windoze, using the "\r\n" in the printf() is more desirable; i.e. "\r\n" used to effect CRLF which an application in Windoze might prefer [by default].

However I would have expected 0x0A for ASCII LF as translated from the EBCDIC 0x25 LF [Line Feed] which I expected from "\n", not the 0x85 which appears to be the ASCII NEL [NExt Line] corresponding to the EBCDIC 0x15 NL [New Line] control character. Hmmm, too long since I have used a printf() to recall accurately the effects for "\n" in EBCDIC... so maybe that will not resolve, even if 0x0D for "\r" should make a Windoze [text viewer\editor] program happier or at least the output prettier :-)

FWiW: the choices in ENDLINFMT() as with CYPTOSTMF, reflect the difference between what each OS might prefer [by default], and a user application might perform or offer something similar for when the target of the text data is known.

Regards, Chuck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.