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

I have a client working with AS / 400. I need to transfer ftp flat file. They tell me their return is RN. I don’t admit it, I can’t find anything on it, and their tech guy is Nick Burns, so he refuses to give me any dirt. Is there a standard return code for AS / 400?

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

+4
source share
4 answers

AS / 400 uses EBCDIC as a character set, not a DOS or Unix ASCII character set. On Unix, lines of text files usually end with ASCII '\n' , while on DOS lines usually end with ASCII '\r\n' .

When using FTP, if you are using EBCDIC transfer type, not bin or ASCII ; ftp should translate these characters for you.

The EBCDIC carriage return is 0x0D, as is ASCII.
EBCDIC linear feed is 0x25, unlike ASCII 0x0A.

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

For more information about ending a line, see this Wikipedia article .

+11
source

Perhaps they mean \ r \ n?

+2
source

\ r \ n

CRLF

Carriage return after line feed

0
source

Since you mention that you are using C #, just use Environment.NewLine and don't worry about it :)

0
source

Source: https://habr.com/ru/post/1309327/


All Articles