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





Will this actually put the '\t' on the IFS text file?

'\t' is a symbolic constant used in the C programming language. You can't use that constant in RPG, just as you can't use *BLANKS in C. Instead, you have to use the hex value of a tab. In EBCDIC, that's x'05


And, yes, it will really work. :)


Is there a way to read back the text file with tab as well?

Of course.


What is CRLF in the example? Is this carriage return?

It's a named constant (see the D-specs) for x'0d25' which is carriage return followed by line feed in EBCDIC. (Because I opened the file with O_TEXTDATA everything I write to the file gets translated to ASCII, so I have to start with EBCDIC characters to make it translate properly)


Can we also use the new line this way? What is the Hex value for that?

Newline ('\n' in C) depends on the operating system conventions. On Unix systems, it outputs a linefeed character. The hex code in EBCDIC is x'25'. On Windows systems it outputs carriage return linefeed (which is what I demonstrated in the example I posted)



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.