Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the carriage return character in an AS/400 db?

I have a client running an AS/400. I have to ftp a flat file over to them. They tell me their return charaters are RN. I don't recognize this, could not find anything on it, and their tech guy is Nick Burns so he refuses to give me any dirtection. Is there a standard return code for AS/400?

I should have mentioned that I have a c# .NET 2.0 console application.

like image 842
donde Avatar asked Dec 13 '22 22:12

donde


2 Answers

The AS/400 uses EBCDIC as a character set, rather than either the DOS or Unix ASCII character set. In Unix, text file lines typically end with ASCII '\n' and in DOS lines typically end with ASCII '\r\n'.

When you FTP, if you use the EBCDIC transfer type, rather than bin or ASCII; ftp is supposed to translate these characters for you.

EBCDIC carriage-return is 0x0D, just like ASCII.
EBCDIC line-feed is 0x25, unlike ASCII 0x0A.

AS/400 EBCDIC new-line has 0x15 - NEL (NExt Line").

For more information on end-of-line termination, see this Wikipedia article.

like image 142
Heath Hunnicutt Avatar answered Jan 07 '23 22:01

Heath Hunnicutt


Perhaps they mean \r\n?

like image 29
ChrisBD Avatar answered Jan 07 '23 23:01

ChrisBD