TIBCO Foresight™ EDISIM®
EDI Data Types
Software Release 6.11.0
July 2012
TIBCO provides the two-second advantage™
Important Information
SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCH EMBEDDED OR BUNDLED TIBCO
SOFTWARE IS SOLELY TO ENABLE THE FUNCTIONALITY (OR PROVIDE LIMITED ADD-ON FUNCTIONALITY) OF THE
LICENSED TIBCO SOFTWARE. THE EMBEDDED OR BUNDLED SOFTWARE IS NOT LICENSED TO BE USED OR ACCESSED BY
ANY OTHER TIBCO SOFTWARE OR FOR ANY OTHER PURPOSE.
USE OF TIBCO SOFTWARE AND THIS DOCUMENT IS SUBJECT TO THE TERMS AND CONDITIONS OF A LICENSE AGREEMENT
FOUND IN EITHER A SEPARATELY EXECUTED SOFTWARE LICENSE AGREEMENT, OR, IF THERE IS NO SUCH SEPARATE
AGREEMENT, THE CLICKWRAP END USER LICENSE AGREEMENT WHICH IS DISPLAYED DURING DOWNLOAD OR
INSTALLATION OF THE SOFTWARE (AND WHICH IS DUPLICATED IN LICENSE.PDF) OR IF THERE IS NO SUCH SOFTWARE
LICENSE AGREEMENT OR CLICKWRAP END USER LICENSE AGREEMENT, THE LICENSE(S) LOCATED IN THE “LICENSE”
FILE(S) OF THE SOFTWARE. USE OF THIS DOCUMENT IS SUBJECT TO THOSE TERMS AND CONDITIONS, AND YOUR USE
HEREOF SHALL CONSTITUTE ACCEPTANCE OF AND AN AGREEMENT TO BE BOUND BY THE SAME.
This document contains confidential information that is subject to U.S. and international copyright laws and treaties. No part of this document may be
reproduced in any form without the written authorization of TIBCO Software Inc.
TIB, TIBCO, TIBCO Adapter, Predictive Business, Information Bus, The Power of Now, TIBCO ActiveMatrix BusinessWorks, and TIBCO
Foresight EDISIM are either registered trademarks or trademarks of TIBCO Software Inc. in the United States and/or other countries.
EJB, Java EE, J2EE, and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other
countries.
All other product and company names and marks mentioned in this document are the property of their respective owners and are mentioned for
identification purposes only.
THIS SOFTWARE MAY BE AVAILABLE ON MULTIPLE OPERATING SYSTEMS. HOWEVER, NOT ALL OPERATING SYSTEM
PLATFORMS FOR A SPECIFIC SOFTWARE VERSION ARE RELEASED AT THE SAME TIME. SEE THE README.TXT FILE FOR
THE AVAILABILITY OF THIS SOFTWARE VERSION ON A SPECIFIC OPERATING SYSTEM PLATFORM.
THIS DOCUMENT IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT.
THIS DOCUMENT COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE
PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORATED IN NEW EDITIONS OF
THIS DOCUMENT. TIBCO SOFTWARE INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR
THE PROGRAM(S) DESCRIBED IN THIS DOCUMENT AT ANY TIME.
THE CONTENTS OF THIS DOCUMENT MAY BE MODIFIED AND/OR QUALIFIED, DIRECTLY OR INDIRECTLY, BY OTHER
DOCUMENTATION WHICH ACCOMPANIES THIS SOFTWARE, INCLUDING BUT NOT LIMITED TO ANY RELEASE NOTES AND
"READ ME" FILES.
Please see Licensing_Foresight_Products.pdf for licensing details.
Copyright © 1999-2012 TIBCO Software Inc. ALL RIGHTS RESERVED.
TIBCO Software Inc. Confidential Information
Contents
Document Purpose ............................................................................................................................................. 3
Audience ............................................................................................................................................................ 3
Data Types for X12-based Transactions ............................................................................................................ 3
Data Types for EDIFACT-based Messages ....................................................................................................... 4
EDI Data Types
1
7/31/2012
EDI Data Types
2
7/31/2012
Document Purpose
This document describes standard EDI data types.
Audience
EDI specialists and business analysts working with Foresight products.
Data Types for X12-based Transactions
AN
(X12, UCS, VICS) Alphanumeric, a sequence of any printable characters. Significant characters
should be left justified. Leading spaces, when they occur, are assumed to be significant. Trailing
spaces should not be included.
B
(X12) Binary. A sequence of octets ranging in value from binary 00000000 to binary 11111111. This
type has no defined length, but the length is specified with the preceding element. This type only
occurs in the BIN segment.
DT
(X12, UCS, VICS) Date, in YYMMDD or CCYYMMDD format. CC is century.
ID
(X12, UCS, VICS) Code values taken from a predefined list distributed by X12, VICS, UCS, etc.
N
(X12, UCS, VICS)
or Nn
(UCS, VICS) Numeric data with implied decimal. The decimal is not included in the EDI file (this is
what distinguishes it from R types). If included, n shows the number of digits to the right of the
implied decimal.
Leading zeros are suppressed unless needed to satisfy the minimum length of the element. If the
value is negative, include a minus sign, which does not count toward the length.)
N and N0 are equivalent (it is not necessary to include the zero). This means the implied decimal is
at the end of the number.
N1 means there is one digit to the right of the implied decimal. Example: The element contains the
value -123, which is to be interpreted as -12.3.
N2 means there are two digits to the right of the implied decimal.
Examples:
The element contains the value 1234567890 and the type is N9. This is to be interpreted as
1.234567890.
The element contains the value 12345 and the type is N9. This is to be interpreted as 0.000012345.
If the value to be represented is 100.25, and the type is N2, the transmitted data is 10025.
If the value is -100.25, and the type is N2, the transmitted data would be -10025.
If the value is to be interpreted as .01 and N2, the transmitted data is 1 .
R
(X12, UCS, VICS)
or Rn
(UCS) Decimal numeric data where the decimal is required in the transmitted data if the number
contains a fraction, but is optional for integers.
UCS transactions only: n can be included, and shows the maximum number of digits to the right of
the decimal. R0 means there should be no digits to the right of the decimal. It is a whole number.
EDI Data Types
3
7/31/2012
Do not include the decimal for whole numbers and do not include leading zeros. Do not include
commas in the number (use 1000 rather than 1,000.
The minus sign is included if it is negative. Do not include: commas or plus signs. Leading zeros
should be suppressed unless needed to satisfy the minimum length. Trailing zeros at the end should
be omitted if the value includes a decimal point unless they show the level of precision. Signs and
decimal points do not count toward length.
Examples:
The data in the EDI file is 150.25 and the type is R. The value being represented is also 150.25.
The EDI data contains 150.23 but the type is R1. The value being represented would be 150.2.
TM
(X12, UCS, VICS) Time, in 24-hour clock time as follows: HHMM, HHMMSS, or HHMMSSD, or
HHMMSSDD, where H = hours (00-23), M = minutes (00-59), S = integer seconds (00-59) and DD =
decimal seconds; decimal seconds are expressed as follows: D = tenths (0-9) and DD = hundredths
(00-99)
Data Types for EDIFACT-based Messages
A
Any letters, special characters, and control characters. No digits.
AN
Any letters, digits, special characters, and control characters.
ID
Alphabetic, numeric, or alphanumeric identifier
N
Numeric. Can include decimal mark (either point or comma is acceptable for this)
EDIFACT notation combines the type and length as in the following examples:
a3
exactly 3 alphabetic characters.
a..3
up to three alphabetic characters.
an5
exactly 5 alphanumeric characters
an..5
up to 5 alphanumeric characters.
n..9
up to nine digits
n9
exactly nine digits
EDIFACT Numeric Data
If the element has variable length, omit leading zeros and trailing spaces unless significant. A single zero before a
decimal is significant, and a zero may be significant if the element’s specification states that it is (example:
temperature).
Omit the sign unless negative.
Signs and decimals don’t count toward maximum field length. However, you still have to allow for them in
transmission and reception.
If the number is fractional, include the decimal mark. If a decimal mark is included in the EDI file, include at least one
digit before and after it. Do not include decimals for integers unless needed to indicate precision.
EDI Data Types
4
7/31/2012
Decimal Examples
Preferred
0,5
2
2,0
Allowed
0.5
2
2.0
Not Allowed
,5
.5
2,
2.
The official representation for the decimal mark is the comma, but a dot is also allowed. If a UNA is included, its third
character can specify the decimal mark.
The type does not specify where the decimal mark should go. To help specify the precise number of decimals,
EDIFACT has these guidelines:
repr.
integer digits
Weights
n..15
12
3
123456789012.345
Cubes
n..9
5
4
12345.6789
Quantities
n..15
12
3
123456789012.345
Unit prices
n..15
11
4
12345678901.234
amounts
n..18
15
3
123456789012345.678
currency rates
n..12
6
6
.123456
percentages
n..7
3
4
80.1255
tax rates
n..7
3
4
29.8765
EDI Data Types
5
decimal places Example value in EDI file
7/31/2012
TIBCO Software Inc., Foresight Group
655 Metro Place South
Suite 900
Dublin OH 43017
Phone: (614) 791-1600
Fax: (614) 791-1609
Web: http://foresight.TIBCO.com
E-mail: FSSupport@TIBCO.com