什么是 EDI 格式?
我以前读过 XML 或 CSV,但从未见过像 EDI 这样的东西。
如何读取该文件并获取我需要的数据? 我看到类似 ~、REF、N1、N2、N4 之类的东西,但不知道这些东西是什么意思。
我看过一些关于 x12 的东西,但不知道这是否是我所拥有的,我怎么知道?
I've read XML or CSV before, but I've never seen anything like EDI.
How do I read this file and get the data that I need? I see things like ~, REF, N1, N2, N4 but have no idea what any of this stuff means.
I've seen somethings about x12 but don't know if that's what I have or not, how can I tell?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
EDI 消息由 X12 标准定义。
如果您寻找 X12 解析器,您可以找到有用的信息。
例如,http://code.activestate.com/recipes/299485/
EDI messages are defined by the X12 standard.
If you look for X12 parsers, you can find helpful information.
For example, http://code.activestate.com/recipes/299485/
EDI 是一种分隔文件格式。 您必须知道行分隔符和列分隔符(因为缺乏更好的答案)。 例如,您可能会看到具有以下格式的 EDI 文件(来自 http:// www.slik.co.nz/HTML_help/edi_file_format.htm):
第一行是标题,告诉您有六个记录。 其他线是细节线。
X12 是 EDI 使用的一种标准。 您将看到 X12 常用于医疗保健领域。 如果你有 X12,你可以检查 X12 标准来弄清楚如何解析。
EDI is a delimited file format. You have to know both the line delimiter and the column delimiter (for lack of a better answer). You might, for example, see an EDI file with the following format (from http://www.slik.co.nz/HTML_help/edi_file_format.htm):
The first line is the header and tells you there are six records. The other lines are detail lines.
X12 is one standard used by EDI. You will see X12 used commonly in healthcare. If you have X12, you can examine the X12 standard to figure out how to parse.
这些是 ANSI X12 文件,标准在此处进行管理 http://www.wpc-edi.com/
结构简述
Hierarchy = Loops-> 段 -> 元素-> 子元素。
循环由控制段或基于标准的逻辑来界定。
默认情况下,段由段终止符分隔~
默认情况下,元素由元素分隔符分隔 *
默认情况下,子元素由子元素分隔符分隔:
Those are ANSI X12 Files the standard is managed here http://www.wpc-edi.com/
Brief tutorial on structure
Hierarchy = Loops-> Segments -> Elements -> Sub Elements.
Loops are bounded either by control segments or logically based on the standard.
Segments are separated by the segment terminator, by default ~
Elements are separated by the element separator, by default *
Sub Elements are separated by sub element separator, by default :
EDI 代表电子数据交换...
它本身并不是一种特定的格式。 一般来说,它是一个平面文本数据文件,通常具有关联的已发布规范。 例如:“位置 23-34 是作为货币价值的原始价格”
如果您没有随附的已定义规范,您实际上将无法对 EDI 文件执行任何有用的操作。
拿到规范后,相信如何读取该文件就会很清楚了。
一般流程是:
1. 读取/解析EDI文件。
2. 对您需要的数据执行任何处理/转换。
3. 将其保留为本地系统格式(表格、其他平面文件等)。
抱歉,我们无法告诉您更多信息。
EDI stands for Electronic Data Interchange...
It's not a specific format per-se. Generally speaking it's a flat text file of data that usually has an associated published specification. For example: "Position 23-34 is the original price as a monetary value"
You really won't be able to do anything useful with an EDI file if you don't have the defined specification that goes along with it.
Once you get the specification, I believe how to read the file will be quite clear.
Generally the process is:
1. Read/Parse the EDI file.
2. Perform any processing/transformation on that data that you need to.
3. Persist it into your local system format (tables, other flat files, whatever).
Sorry there's not much more we could tell you unfortunately.
EDI 代表“电子数据交换”。 这种做法涉及使用计算机技术在两个称为“贸易伙伴”的组织之间以电子方式交换信息或数据。 从技术上讲,EDI 是一组定义信息通用格式的标准,因此可以通过这种方式进行交换。
了解更多:http://www.1edisource.com/learn-关于-edi/什么是-edi#ixzz2g5E4p2ET
EDI stands for “Electronic Data Interchange.” The practice involves using computer technology to exchange information – or data – electronically between two organizations, called “Trading Partners.” Technically, EDI is a set of standards that define common formats for the information so it can be exchanged in this way.
Read more: http://www.1edisource.com/learn-about-edi/what-is-edi#ixzz2g5E4p2ET
EDI 只是一个包含某种层次结构的平面文件。 通常公司会购买 EDI 翻译软件来解析这些文件并提取数据,然后与其他系统集成。 您还可以使用某种类型的服务,他们会为您做到这一点。 您可以尝试使用 Amosoft EDI Serices (www.amosoft.com),他们可以帮助您。
EDI is just a flat file that contain some type of hierarchy. Usually companies buy EDI translator software to parse those files and extract data and then integrate with other systems. You can also use some type of service and they will do that for you. You can try to use Amosoft EDI Serices (www.amosoft.com) and they can help you with that.