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

时光怂恿深爱的人放手 提交于 2019-12-10 17:14:25

问题


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.


回答1:


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.




回答2:


Perhaps they mean \r\n?




回答3:


\r\n

CRLF

Carridge return followd by a Line feed




回答4:


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



来源:https://stackoverflow.com/questions/2803622/what-is-the-carriage-return-character-in-an-as-400-db

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!