edi4r-tdid 0.6.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. data/AuthorCopyright +10 -0
  2. data/COPYING +56 -0
  3. data/ChangeLog +43 -0
  4. data/FileDescription +278 -0
  5. data/LICENAGR.UNTDID +58 -0
  6. data/MSG_ISSUES +46 -0
  7. data/README +48 -0
  8. data/TO-DO +27 -0
  9. data/VERSION +1 -0
  10. data/data/edifact/untdid/EDCD.1901.csv +82 -0
  11. data/data/edifact/untdid/EDCD.1902.csv +82 -0
  12. data/data/edifact/untdid/EDCD.1911.csv +104 -0
  13. data/data/edifact/untdid/EDCD.1921.csv +121 -0
  14. data/data/edifact/untdid/EDCD.2932.csv +102 -0
  15. data/data/edifact/untdid/EDCD.d00a.csv +200 -0
  16. data/data/edifact/untdid/EDCD.d00b.csv +200 -0
  17. data/data/edifact/untdid/EDCD.d01a.csv +200 -0
  18. data/data/edifact/untdid/EDCD.d01b.csv +200 -0
  19. data/data/edifact/untdid/EDCD.d01c.csv +200 -0
  20. data/data/edifact/untdid/EDCD.d02a.csv +200 -0
  21. data/data/edifact/untdid/EDCD.d02b.csv +198 -0
  22. data/data/edifact/untdid/EDCD.d03a.csv +198 -0
  23. data/data/edifact/untdid/EDCD.d03b.csv +198 -0
  24. data/data/edifact/untdid/EDCD.d04a.csv +198 -0
  25. data/data/edifact/untdid/EDCD.d04b.csv +198 -0
  26. data/data/edifact/untdid/EDCD.d05a.csv +198 -0
  27. data/data/edifact/untdid/EDCD.d05b.csv +197 -0
  28. data/data/edifact/untdid/EDCD.d93a.csv +121 -0
  29. data/data/edifact/untdid/EDCD.d94a.csv +124 -0
  30. data/data/edifact/untdid/EDCD.d94b.csv +125 -0
  31. data/data/edifact/untdid/EDCD.d95a.csv +145 -0
  32. data/data/edifact/untdid/EDCD.d95b.csv +160 -0
  33. data/data/edifact/untdid/EDCD.d96a.csv +161 -0
  34. data/data/edifact/untdid/EDCD.d96b.csv +174 -0
  35. data/data/edifact/untdid/EDCD.d97a.csv +174 -0
  36. data/data/edifact/untdid/EDCD.d97b.csv +176 -0
  37. data/data/edifact/untdid/EDCD.d98a.csv +179 -0
  38. data/data/edifact/untdid/EDCD.d98b.csv +186 -0
  39. data/data/edifact/untdid/EDCD.d99a.csv +187 -0
  40. data/data/edifact/untdid/EDCD.d99b.csv +194 -0
  41. data/data/edifact/untdid/EDCD.s93a.csv +121 -0
  42. data/data/edifact/untdid/EDED.1901.csv +220 -0
  43. data/data/edifact/untdid/EDED.1902.csv +220 -0
  44. data/data/edifact/untdid/EDED.1911.csv +299 -0
  45. data/data/edifact/untdid/EDED.1921.csv +344 -0
  46. data/data/edifact/untdid/EDED.2932.csv +291 -0
  47. data/data/edifact/untdid/EDED.d00a.csv +640 -0
  48. data/data/edifact/untdid/EDED.d00b.csv +644 -0
  49. data/data/edifact/untdid/EDED.d01a.csv +644 -0
  50. data/data/edifact/untdid/EDED.d01b.csv +641 -0
  51. data/data/edifact/untdid/EDED.d01c.csv +643 -0
  52. data/data/edifact/untdid/EDED.d02a.csv +643 -0
  53. data/data/edifact/untdid/EDED.d02b.csv +643 -0
  54. data/data/edifact/untdid/EDED.d03a.csv +648 -0
  55. data/data/edifact/untdid/EDED.d03b.csv +648 -0
  56. data/data/edifact/untdid/EDED.d04a.csv +650 -0
  57. data/data/edifact/untdid/EDED.d04b.csv +650 -0
  58. data/data/edifact/untdid/EDED.d05a.csv +650 -0
  59. data/data/edifact/untdid/EDED.d05b.csv +649 -0
  60. data/data/edifact/untdid/EDED.d93a.csv +344 -0
  61. data/data/edifact/untdid/EDED.d94a.csv +356 -0
  62. data/data/edifact/untdid/EDED.d94b.csv +362 -0
  63. data/data/edifact/untdid/EDED.d95a.csv +405 -0
  64. data/data/edifact/untdid/EDED.d95b.csv +459 -0
  65. data/data/edifact/untdid/EDED.d96a.csv +462 -0
  66. data/data/edifact/untdid/EDED.d96b.csv +496 -0
  67. data/data/edifact/untdid/EDED.d97a.csv +535 -0
  68. data/data/edifact/untdid/EDED.d97b.csv +547 -0
  69. data/data/edifact/untdid/EDED.d98a.csv +553 -0
  70. data/data/edifact/untdid/EDED.d98b.csv +582 -0
  71. data/data/edifact/untdid/EDED.d99a.csv +593 -0
  72. data/data/edifact/untdid/EDED.d99b.csv +622 -0
  73. data/data/edifact/untdid/EDED.s93a.csv +344 -0
  74. data/data/edifact/untdid/EDMD.1901.csv +276 -0
  75. data/data/edifact/untdid/EDMD.1902.csv +276 -0
  76. data/data/edifact/untdid/EDMD.1911.csv +905 -0
  77. data/data/edifact/untdid/EDMD.1921.csv +1239 -0
  78. data/data/edifact/untdid/EDMD.2932.csv +626 -0
  79. data/data/edifact/untdid/EDMD.d00a.csv +3259 -0
  80. data/data/edifact/untdid/EDMD.d00b.csv +3357 -0
  81. data/data/edifact/untdid/EDMD.d01a.csv +3417 -0
  82. data/data/edifact/untdid/EDMD.d01b.csv +3419 -0
  83. data/data/edifact/untdid/EDMD.d01c.csv +3428 -0
  84. data/data/edifact/untdid/EDMD.d02a.csv +3428 -0
  85. data/data/edifact/untdid/EDMD.d02b.csv +3429 -0
  86. data/data/edifact/untdid/EDMD.d03a.csv +3420 -0
  87. data/data/edifact/untdid/EDMD.d03b.csv +3421 -0
  88. data/data/edifact/untdid/EDMD.d04a.csv +3423 -0
  89. data/data/edifact/untdid/EDMD.d04b.csv +3423 -0
  90. data/data/edifact/untdid/EDMD.d05a.csv +3446 -0
  91. data/data/edifact/untdid/EDMD.d05b.csv +3447 -0
  92. data/data/edifact/untdid/EDMD.d93a.csv +1302 -0
  93. data/data/edifact/untdid/EDMD.d94a.csv +1419 -0
  94. data/data/edifact/untdid/EDMD.d94b.csv +1511 -0
  95. data/data/edifact/untdid/EDMD.d95a.csv +1752 -0
  96. data/data/edifact/untdid/EDMD.d95b.csv +1956 -0
  97. data/data/edifact/untdid/EDMD.d96a.csv +2144 -0
  98. data/data/edifact/untdid/EDMD.d96b.csv +2342 -0
  99. data/data/edifact/untdid/EDMD.d97a.csv +2417 -0
  100. data/data/edifact/untdid/EDMD.d97b.csv +2565 -0
  101. data/data/edifact/untdid/EDMD.d98a.csv +2671 -0
  102. data/data/edifact/untdid/EDMD.d98b.csv +2803 -0
  103. data/data/edifact/untdid/EDMD.d99a.csv +2896 -0
  104. data/data/edifact/untdid/EDMD.d99b.csv +3150 -0
  105. data/data/edifact/untdid/EDMD.s93a.csv +1054 -0
  106. data/data/edifact/untdid/EDSD.1901.csv +59 -0
  107. data/data/edifact/untdid/EDSD.1902.csv +59 -0
  108. data/data/edifact/untdid/EDSD.1911.csv +78 -0
  109. data/data/edifact/untdid/EDSD.1921.csv +89 -0
  110. data/data/edifact/untdid/EDSD.2932.csv +75 -0
  111. data/data/edifact/untdid/EDSD.d00a.csv +157 -0
  112. data/data/edifact/untdid/EDSD.d00b.csv +158 -0
  113. data/data/edifact/untdid/EDSD.d01a.csv +158 -0
  114. data/data/edifact/untdid/EDSD.d01b.csv +158 -0
  115. data/data/edifact/untdid/EDSD.d01c.csv +158 -0
  116. data/data/edifact/untdid/EDSD.d02a.csv +158 -0
  117. data/data/edifact/untdid/EDSD.d02b.csv +155 -0
  118. data/data/edifact/untdid/EDSD.d03a.csv +155 -0
  119. data/data/edifact/untdid/EDSD.d03b.csv +155 -0
  120. data/data/edifact/untdid/EDSD.d04a.csv +156 -0
  121. data/data/edifact/untdid/EDSD.d04b.csv +156 -0
  122. data/data/edifact/untdid/EDSD.d05a.csv +156 -0
  123. data/data/edifact/untdid/EDSD.d05b.csv +156 -0
  124. data/data/edifact/untdid/EDSD.d93a.csv +89 -0
  125. data/data/edifact/untdid/EDSD.d94a.csv +93 -0
  126. data/data/edifact/untdid/EDSD.d94b.csv +95 -0
  127. data/data/edifact/untdid/EDSD.d95a.csv +109 -0
  128. data/data/edifact/untdid/EDSD.d95b.csv +126 -0
  129. data/data/edifact/untdid/EDSD.d96a.csv +127 -0
  130. data/data/edifact/untdid/EDSD.d96b.csv +136 -0
  131. data/data/edifact/untdid/EDSD.d97a.csv +136 -0
  132. data/data/edifact/untdid/EDSD.d97b.csv +138 -0
  133. data/data/edifact/untdid/EDSD.d98a.csv +138 -0
  134. data/data/edifact/untdid/EDSD.d98b.csv +146 -0
  135. data/data/edifact/untdid/EDSD.d99a.csv +148 -0
  136. data/data/edifact/untdid/EDSD.d99b.csv +152 -0
  137. data/data/edifact/untdid/EDSD.s93a.csv +89 -0
  138. data/data/edifact/untdid/IDCD.d00a.csv +93 -0
  139. data/data/edifact/untdid/IDCD.d00b.csv +96 -0
  140. data/data/edifact/untdid/IDCD.d01a.csv +95 -0
  141. data/data/edifact/untdid/IDCD.d01b.csv +95 -0
  142. data/data/edifact/untdid/IDCD.d01c.csv +96 -0
  143. data/data/edifact/untdid/IDCD.d02a.csv +96 -0
  144. data/data/edifact/untdid/IDCD.d02b.csv +96 -0
  145. data/data/edifact/untdid/IDCD.d03a.csv +96 -0
  146. data/data/edifact/untdid/IDCD.d03b.csv +96 -0
  147. data/data/edifact/untdid/IDCD.d04a.csv +96 -0
  148. data/data/edifact/untdid/IDCD.d04b.csv +96 -0
  149. data/data/edifact/untdid/IDCD.d05a.csv +96 -0
  150. data/data/edifact/untdid/IDCD.d05b.csv +96 -0
  151. data/data/edifact/untdid/IDCD.d97a.csv +57 -0
  152. data/data/edifact/untdid/IDCD.d97b.csv +64 -0
  153. data/data/edifact/untdid/IDCD.d98a.csv +65 -0
  154. data/data/edifact/untdid/IDCD.d98b.csv +67 -0
  155. data/data/edifact/untdid/IDCD.d99a.csv +73 -0
  156. data/data/edifact/untdid/IDCD.d99b.csv +87 -0
  157. data/data/edifact/untdid/IDMD.d00a.csv +132 -0
  158. data/data/edifact/untdid/IDMD.d00b.csv +236 -0
  159. data/data/edifact/untdid/IDMD.d01a.csv +237 -0
  160. data/data/edifact/untdid/IDMD.d01b.csv +238 -0
  161. data/data/edifact/untdid/IDMD.d01c.csv +243 -0
  162. data/data/edifact/untdid/IDMD.d02a.csv +243 -0
  163. data/data/edifact/untdid/IDMD.d02b.csv +243 -0
  164. data/data/edifact/untdid/IDMD.d03a.csv +243 -0
  165. data/data/edifact/untdid/IDMD.d03b.csv +243 -0
  166. data/data/edifact/untdid/IDMD.d04a.csv +243 -0
  167. data/data/edifact/untdid/IDMD.d04b.csv +243 -0
  168. data/data/edifact/untdid/IDMD.d05a.csv +243 -0
  169. data/data/edifact/untdid/IDMD.d05b.csv +243 -0
  170. data/data/edifact/untdid/IDMD.d97a.csv +41 -0
  171. data/data/edifact/untdid/IDMD.d97b.csv +70 -0
  172. data/data/edifact/untdid/IDMD.d98a.csv +70 -0
  173. data/data/edifact/untdid/IDMD.d98b.csv +70 -0
  174. data/data/edifact/untdid/IDMD.d99a.csv +112 -0
  175. data/data/edifact/untdid/IDMD.d99b.csv +122 -0
  176. data/data/edifact/untdid/IDSD.d00a.csv +72 -0
  177. data/data/edifact/untdid/IDSD.d00b.csv +76 -0
  178. data/data/edifact/untdid/IDSD.d01a.csv +75 -0
  179. data/data/edifact/untdid/IDSD.d01b.csv +75 -0
  180. data/data/edifact/untdid/IDSD.d01c.csv +77 -0
  181. data/data/edifact/untdid/IDSD.d02a.csv +77 -0
  182. data/data/edifact/untdid/IDSD.d02b.csv +77 -0
  183. data/data/edifact/untdid/IDSD.d03a.csv +77 -0
  184. data/data/edifact/untdid/IDSD.d03b.csv +77 -0
  185. data/data/edifact/untdid/IDSD.d04a.csv +77 -0
  186. data/data/edifact/untdid/IDSD.d04b.csv +77 -0
  187. data/data/edifact/untdid/IDSD.d05a.csv +77 -0
  188. data/data/edifact/untdid/IDSD.d05b.csv +77 -0
  189. data/data/edifact/untdid/IDSD.d97a.csv +33 -0
  190. data/data/edifact/untdid/IDSD.d97b.csv +42 -0
  191. data/data/edifact/untdid/IDSD.d98a.csv +43 -0
  192. data/data/edifact/untdid/IDSD.d98b.csv +44 -0
  193. data/data/edifact/untdid/IDSD.d99a.csv +52 -0
  194. data/data/edifact/untdid/IDSD.d99b.csv +63 -0
  195. data/lib/edi4r-tdid.rb +52 -0
  196. data/test/dirlist +32 -0
  197. data/test/dirlist_iedi +19 -0
  198. data/test/test_diags.rb +160 -0
  199. data/test/test_segments.rb +109 -0
  200. metadata +249 -0
@@ -0,0 +1,10 @@
1
+ == Author
2
+
3
+ Heinz W. Werntges, FH Wiesbaden
4
+ (edi@informatik.fh-wiesbaden.de)
5
+
6
+ == Copyright
7
+
8
+ Copyright (c) 2006 Heinz W. Werntges.
9
+ Licensed under the same terms as Ruby.
10
+
data/COPYING ADDED
@@ -0,0 +1,56 @@
1
+ Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
2
+ You can redistribute it and/or modify it under either the terms of the GPL
3
+ (see the file GPL), or the conditions below:
4
+
5
+ 1. You may make and give away verbatim copies of the source form of the
6
+ software without restriction, provided that you duplicate all of the
7
+ original copyright notices and associated disclaimers.
8
+
9
+ 2. You may modify your copy of the software in any way, provided that
10
+ you do at least ONE of the following:
11
+
12
+ a) place your modifications in the Public Domain or otherwise
13
+ make them Freely Available, such as by posting said
14
+ modifications to Usenet or an equivalent medium, or by allowing
15
+ the author to include your modifications in the software.
16
+
17
+ b) use the modified software only within your corporation or
18
+ organization.
19
+
20
+ c) give non-standard binaries non-standard names, with
21
+ instructions on where to get the original software distribution.
22
+
23
+ d) make other distribution arrangements with the author.
24
+
25
+ 3. You may distribute the software in object code or binary form,
26
+ provided that you do at least ONE of the following:
27
+
28
+ a) distribute the binaries and library files of the software,
29
+ together with instructions (in the manual page or equivalent)
30
+ on where to get the original distribution.
31
+
32
+ b) accompany the distribution with the machine-readable source of
33
+ the software.
34
+
35
+ c) give non-standard binaries non-standard names, with
36
+ instructions on where to get the original software distribution.
37
+
38
+ d) make other distribution arrangements with the author.
39
+
40
+ 4. You may modify and include the part of the software into any other
41
+ software (possibly commercial). But some files in the distribution
42
+ are not written by the author, so that they are not under these terms.
43
+
44
+ For the list of those files and their copying conditions, see the
45
+ file LEGAL.
46
+
47
+ 5. The scripts and library files supplied as input to or produced as
48
+ output from the software do not automatically fall under the
49
+ copyright of the software, but belong to whomever generated them,
50
+ and may be sold commercially, and may be aggregated with this
51
+ software.
52
+
53
+ 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
54
+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
55
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
56
+ PURPOSE.
@@ -0,0 +1,43 @@
1
+ = Change log
2
+
3
+ == 0.6.3.1
4
+ Bug fix for Windows implementation of class "Pathname".
5
+
6
+ == 0.6.3
7
+ New test (test_segments.rb) which actually loads all segments of
8
+ all message types, thus applying more tests to the CSV files.
9
+
10
+ This test discovered a new bug. This was fixed in CDE_filter.rb and
11
+ seg_filter.rb. Now some previously missing segments and CDEs at the beginning
12
+ of files ED[CS]D.*.csv are included.
13
+
14
+ The new test also searches for "distant duplicates", i.e. (C)DE of the
15
+ same name in a single segment, but with some other entity in between.
16
+ Many such occurrences are found in some early release - please ignore.
17
+
18
+ Note that the search for distant DE duplicates within CDEs is
19
+ commented out: There are many such cases, it appears to be a
20
+ frequent feature of UN/EDIFACT CDEs. Ex.: 3055, 1131 in C088, C243;
21
+ 5275 in C203; 7064, 7143 in C402.
22
+ Keep the exitance of such distant duplicates in mind when accessing
23
+ them through method a3055 and such: Though you get all occurrences back
24
+ as an array, remember that they are not adjacent.
25
+
26
+ == 0.6.2
27
+ Description of CSV files now included
28
+
29
+ == 0.6.1
30
+ Issues in UN/TDID messages patched and reported to UN/ECE
31
+ Test code adapted to edi4r >= 0.9.1
32
+
33
+ == 0.6.0
34
+ === First release as a gem
35
+ * Split from the edi4r core package, turned into a separate one.
36
+ * Diagram test (unit test) added, resulting issues fixed
37
+ * RDoc documentation added
38
+ * Modular loading scheme for normdata added (through EDI_NDB_PATH)
39
+ * Rolled into a gem
40
+
41
+ == pre-0.6.0
42
+ * Used internally for projects and teaching, as part of "edi4r"
43
+
@@ -0,0 +1,278 @@
1
+ = Description of the included CSV files
2
+
3
+ == Directory structure
4
+
5
+ [<tt>./data</tt>]
6
+ Base directory for all format descriptions
7
+
8
+ [<tt>./data/edifact</tt>]
9
+ Keeps descriptions of ISO 9735 and TDIDs as well as subsets
10
+
11
+ [<tt>./data/edifact/iso9735</tt>]
12
+ Descriptions of EDIFACT syntax versions 1-4: Service segments
13
+ and their composites and data elements, messages types
14
+ included at the syntax level (CONTRL, AUTACK, etc.)
15
+
16
+ These data are included in the base gem "edi4r"!
17
+
18
+ [<tt>./data/edifact/untdid</tt>]
19
+ Descriptions of all available UN Trade Data Interchange Directories
20
+ Main topic of this gem!
21
+
22
+ == File naming convention (in .../untdid)
23
+ <i>b</i>D<i>t</i>D.<i>vrrr</i>.csv
24
+
25
+ === <i>b</i>: Batch or general vs. Interactive EDI
26
+ <i>b</i>=E:: General or batch EDI
27
+ <i>b</i>=I:: Interactive EDI only
28
+
29
+ === <i>t</i>: Type of directory
30
+ <i>t</i>=M:: Message directory
31
+ <i>t</i>=S:: Segment directory
32
+ <i>t</i>=C:: Composite data element directory
33
+ <i>t</i>=D:: Data element directory
34
+
35
+ === <i>v</i>: Version of directory
36
+ 1:: Indicates 90.1, 90.2, 91.1, or 92.1
37
+ 2:: Only 93.2
38
+ s:: Only S.93A
39
+ d:: all others
40
+
41
+ This value is typically mapped to DE 0052 of S009 or S306
42
+
43
+ === <i>rrr</i>: Release of directory
44
+ * Examples: 911 (for 91.1), 93a (D93.A, S93.A), 05b (D.05B)
45
+ * This value is typically mapped to DE 0054 of S009 or S306
46
+
47
+ === Examples:
48
+ EDCD.1911.csv:: The composite data element directory of version/release 91.1
49
+ EDSD.d93a.csv:: The segment directory of D.93A
50
+ IDMD.d05b.csv:: The part of message directory of D.05B containing the
51
+ interactive EDI messages
52
+
53
+ == Common data structure
54
+
55
+ * Each record is a single line in CSV format, with ';' as separator character
56
+ * Values are given in plain ASCII and are not quoted
57
+ * We assume that the separator character is never used as a regular content
58
+ character. Hence, there is no need for character escaping,
59
+ and none is provided.
60
+
61
+ == Code list directory
62
+
63
+ (sorry - this version does not include the code lists yet)
64
+
65
+
66
+ == Data element directory
67
+
68
+ A data element record is a simple sequence of 4 fields.
69
+
70
+ [Sample record]
71
+ <tt>1131;an..3;C;Code list qualifier</tt>
72
+
73
+ [Field 1, e.g. <tt>1131</tt>]
74
+ Tag of data element, always a 4-digit number.
75
+
76
+ [Field 2, e.g. <tt>an..3</tt>]
77
+ Representation of the data element.
78
+
79
+ [Field 3, e.g. <tt>C</tt>]
80
+ Usage indicator.
81
+ B:: Used in batch messages only
82
+ I:: Used in interactive messages only
83
+ C:: Common usage in both batch and interactive messages
84
+ Note: 'C' is also provided for the directories without interactive messages
85
+
86
+ [Field 4, e.g. <tt>Code list qualifier</tt>]
87
+ The data element name.
88
+ Note that the usually longer 'description' text is not provided here.
89
+
90
+
91
+ == Composite data element directory
92
+
93
+ A composite data element record consists of two header fields and a
94
+ variable number of field groups, each of which describing one
95
+ component data element of the composite.
96
+
97
+ Each field group consists of 4 fields. Header fields and field groups
98
+ may be identified simply by counting the fields - they are not
99
+ distinguished by e.g. a different separator character.
100
+
101
+ Each composite data element contains at least one such field group
102
+ (or else it would be useless), so a composite record consists of
103
+ 2 + 4*n fields, with n >= 1.
104
+
105
+ [Sample record]
106
+ <tt>C107;TEXT REFERENCE;010;4441;M;an..17;020;1131;C;an..17;030;3055;C;an..3;</tt>
107
+
108
+ [Field 1, e.g. <tt>C107</tt>]
109
+ Tag of composite data element, always a character followed by a
110
+ 3-digit number. Generally, the leading character is 'E' for a composite
111
+ used by interactive EDI segments, 'C' in the normal case, or 'S'
112
+ for service composites (provided by ISO 9735, not by the TDIDs).
113
+
114
+ [Field 2, e.g. <tt>TEXT REFERENCE</tt>]
115
+ The composite data element name.
116
+ Note that the usually longer 'description' text is not provided here.
117
+
118
+ [Component element field group, e.g. <tt>010;4441;M;an..17;</tt>]
119
+ There is one field group for each component data element.
120
+ Each field group comprises 4 sub-fields:
121
+ [Sub-field 1]
122
+ Sequence number of component, e.g. <tt>010</tt>
123
+ Always a 3-digit number. It is counted up in increments of 10 and
124
+ indicates the position of the component in the composite.
125
+ Note that sequence numbers are missing in the older UN/TDIDs, and that
126
+ this package adds them where missing simply by counting the components
127
+ in their documented sequence of occurrence.
128
+ [Sub-field 2]
129
+ Component data element tag, e.g. <tt>4441</tt>
130
+ [Sub-field 3]
131
+ Component data element status, e.g. <tt>M</tt>
132
+ For plain EDIFACT, only 'M' (mandatory) or 'C' occur.
133
+ Some subsets add other values here.
134
+ [Sub-field 4]
135
+ Component data element representation, e.g. <tt>an..17</tt>.
136
+ This field should match the corresponding value of this data element
137
+ as stated in the Data Element Directory.
138
+
139
+
140
+ == Segment directory
141
+
142
+ A segment record consists of two header fields and a
143
+ variable number of field groups, each of which describing one
144
+ included composite or simple data element.
145
+
146
+ Each field group consists of 4 fields. Header fields and field groups
147
+ may be identified simply by counting the fields - they are not
148
+ distinguished by e.g. a different separator character.
149
+
150
+ Each segment contains at least one such field group
151
+ (or else it would be useless), so a segment record consists of
152
+ 2 + 4*n fields, with n >= 1.
153
+
154
+ [Sample records]
155
+ <tt>DTM;DATE/TIME/PERIOD;010;C507;M;1;</tt>
156
+ <tt>BGM;BEGINNING OF MESSAGE;010;C002;C;1;020;C106;C;1;030;1225;C;1;040;4343;C;1;</tt>
157
+
158
+ [Field 1, e.g. <tt>DTM</tt>]
159
+ Segment tag, always a 3-character string. Note that service segments
160
+ (those whose tags start with 'U') are provided by ISO 9735, not by the TDIDs.
161
+
162
+ [Field 2, e.g. <tt>DATE/TIME/PERIOD</tt>]
163
+ The segment element name.
164
+ Note that the usually more explicit 'description' text is not provided here.
165
+
166
+ [Data element field group, e.g. <tt>010;C507;M;1;</tt>]
167
+ There is one field group for each included (composite or plain) data element.
168
+ Each field group comprises 4 sub-fields:
169
+ [Sub-field 1]
170
+ Sequence number of component, e.g. <tt>010</tt>, always a 3-digit number.
171
+ It is counted up in increments of 10 and indicates the position of the
172
+ component in the composite.
173
+
174
+ Note that sequence numbers are missing in the older UN/TDIDs, and that
175
+ this package adds them where missing simply by counting the components
176
+ in their documented sequence of occurrence.
177
+ [Sub-field 2]
178
+ Data element tag, e.g. <tt>C507</tt> or <tt>1225</tt>.
179
+ This is a reference to the corresponding composite or data element
180
+ directory.
181
+ [Sub-field 3]
182
+ Data element status, e.g. <tt>M</tt>
183
+ For plain EDIFACT, only 'M' (mandatory) or 'C' occur.
184
+ Some subsets add other values here.
185
+ [Sub-field 4]
186
+ Data element repetition, in most cases <tt>1</tt>.
187
+ The ability to repeat data elements or composites within segments
188
+ is a feature introduced by syntax version 4 and so far is rarely used.
189
+ A value of '1' is added by this package to older releases which
190
+ did not yet provide it.
191
+
192
+
193
+ == Message directory
194
+
195
+ Basically, a message consists of a linear sequence of segments or
196
+ segment groups. Segment groups, however, may contain other segment groups
197
+ (in a non-recursive manner), and thus a message is a tree-like
198
+ (hierarchical) structure - with a main trunk and branches.
199
+ Each branch may be regarded as another trunk with optional branches.
200
+
201
+ We describe a message by listing all of its branches, including
202
+ the main branch (trunk), by supplying <b>one record for each branch</b>
203
+ (segment group) of a message.
204
+
205
+ The trunk record contains the message description, but no segment group name.
206
+ Records of dependent branches contain a dummy text (usually the simplified
207
+ segment group name) in the description field and their formal segment group
208
+ name, by which they are referenced from higher-level branches.
209
+
210
+ Each message branch record consists of two header fields and a
211
+ variable number of field groups, each of which describing one
212
+ included segment or segment group.
213
+
214
+ Each field group consists of 3 fields. Header fields and field groups
215
+ may be identified simply by counting the fields - they are not
216
+ distinguished by e.g. a different separator character. However,
217
+ the first header field contains sub-fields which are separated
218
+ by the ':' character (UNH style).
219
+
220
+ Each message record contains at least one such field group
221
+ (or else it would be useless), so a message record consists of
222
+ 2 + 3*n fields, with n >= 1.
223
+
224
+
225
+ [Sample records]
226
+ <tt>BANSTA:D:93A:UN::;BANKING STATUS MESSAGE;UNH;M;1;SG1;M;1;SG2;M;2;SG3;C;5;SG4;C;99;SG8;C;1;UNT;M;1</tt>
227
+ <tt>BANSTA:D:93A:UN::SG6;SG06;GIS;M;1;DTM;C;1;SG7;C;99</tt>
228
+ <tt>BANSTA:D:93A:UN::SG7;SG07;ERC;M;1;FTX;C;5;DOC;C;5</tt>
229
+
230
+ [Field 1, e.g. <tt>BANSTA:D:93A:UN::</tt> or <tt>BANSTA:D:93A:UN::SG06</tt>]
231
+ This is the selector field. It uniquely identifies the branch described
232
+ by the following fields. In combination, the 6 sub-fields form
233
+ a unique lookup key:
234
+
235
+ [Sub-field 1, e.g. <tt>BANSTA</tt>]
236
+ Message name, always a 6-character string. Note that service messages
237
+ (e.g. 'CONTRL') are provided by ISO 9735, not by the TDIDs.
238
+
239
+ [Sub-field 2, e.g. <tt>D</tt>]
240
+ The message version, one of '1', '2', 'S', 'D'; cf. DE 0052.
241
+
242
+ [Sub-field 3, e.g. <tt>93A</tt>]
243
+ The message release, cf. DE 0054.
244
+
245
+ [Sub-field 4, e.g. <tt>UN</tt>]
246
+ The responsible agency (of this message); cf. DE 0051.
247
+
248
+ [Sub-field 5, empty for plain EDIFACT, but used by subsets (SV 1-3)]
249
+ The association assigned code, e.g. <tt>EAN008</tt> for subset EANCOM.
250
+
251
+ [Sub-field 6, e.g. <tt>SG7</tt> or empty]
252
+ The branch name; empty for the main trunk.
253
+
254
+ [Field 2, e.g. <tt>SG07</tt>]
255
+ The message description, e.g. <tt>BANKING STATUS MESSAGE</tt>,
256
+ or <tt>SG07</tt>. The description text for the main trunk is obtained
257
+ from the title of the corresponding UN/EDIFACT message type description.
258
+ For depending branches, this text equals prefix 'SG' appended
259
+ by the 2-digit segment group number.
260
+
261
+ [Segment field group, e.g. <tt>GIS;M;1;DTM;C;1;SG7;C;99</tt>]
262
+ There is one field group for each included segment or segment group.
263
+ Each field group comprises 3 sub-fields:
264
+ [Sub-field 1]
265
+ The segment tag or branch name, e.g. <tt>GIS</tt> or <tt>SG7</tt>.
266
+ In contrast to the description text, branch names (of segment groups)
267
+ do not include leading zeroes.
268
+ [Sub-field 3]
269
+ Segment or segment group status, e.g. <tt>M</tt>
270
+ For plain EDIFACT, only 'M' (mandatory) or 'C' occur.
271
+ Some subsets add other values here.
272
+ [Sub-field 4]
273
+ Segment or segment group repetition indicator.
274
+
275
+ Note: EDIFACT rules assign a level to each segment of a message type.
276
+ While this level usally reflects the hierarchy, level '0' comprises
277
+ an exception: Segments of the main trunk with status=='M' and
278
+ max. repetition=='1' belong to level 0, all others to higher levels.
@@ -0,0 +1,58 @@
1
+ = Licence Agreement for the use of UN/EDIFACT Directory
2
+
3
+ IF YOU DOWNLOAD OR USE THIS PROGRAM, YOU AGREE TO THESE TERMS
4
+
5
+ The UN grants you a license to use this Directory only in the
6
+ country where you acquired it and/or the country(ies) where your
7
+ organization is located. The Directory is copyrighted and
8
+ licensed (not sold). We do not transfer title to the Directory
9
+ to you. You obtain no rights other than those granted you under
10
+ this licence.
11
+
12
+ Under this license, you may:
13
+
14
+ 1. Use the Directory on one or more computers at a time within
15
+ your organization;
16
+
17
+ 2. Make copies of the Directory for use or backup purposes
18
+ within your Enterprise/Organization;
19
+
20
+ 3. Make copies of the original file you downloaded and
21
+ distribute it, provided that you transfer a copy of this
22
+ license to the other party. The other party agrees to these
23
+ terms by its first use of the Program.
24
+
25
+ You must reproduce the copyright notice and any other legend of
26
+ ownership on each copy or partial copy of the Directory.
27
+
28
+ Unless you have received written permission from the UN, you may
29
+ NOT:
30
+
31
+ 1. Sell, sub-license, rent, lease, or assign the Directory; and
32
+ 2. Modify the Directory and distribute it.
33
+
34
+ We do not warrant that the Directory is free from claims by a
35
+ third party of copyright, patent, trademark, trade secret , or
36
+ any other intellectual property infringement.
37
+
38
+ Under no circumstances are we liable for any of the following:
39
+
40
+ 1. Third-party claims against you for losses or damages;
41
+ 2. Loss of, or damage to, your records or data; or
42
+ 3. Economic consequential damages (including lost profits or
43
+ savings) or incidental damages, even if we are informed of
44
+ their possibility.
45
+
46
+ Some jurisdictions do not allow these limitations or exclusions,
47
+ so that they may not apply to you.
48
+ We have no obligation to provide service, defect correction, or
49
+ any maintenance for the Directory, other than through the
50
+ UN/EDIFACT Data Maintenance Process. We have no obligation to
51
+ supply any Directory updates or enhancements to you even if such
52
+ are or later become available.
53
+
54
+ IF YOU DOWNLOAD OR USE THIS PROGRAM, YOU AGREE TO THESE TERMS.
55
+
56
+ THERE ARE NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDED THE IMPLIED
57
+ WARRANTIES OR MERCHANTABILITY AND FITNESS FOR A PARTICULAR
58
+ PURPOSE.