Thomas

> X12 defines the data type for each element and I don't seem to locate
> the definition for the data Type. Where can I find the actual
> definition/meaning of the type definition, e.g. R, ID, AN, N0. I would
> think they associate with real number, alphanumeric, numeric with 0
> decimal etc......but I would still like to get some clarification as to
> what they are.

Sorry for the formatting... This link to the v5 draft
(http://www.x12.org/x12org/subcommittees/dev/pdf/V5_x123.pdf) is on our links
page (http://www.spe-edi.com/links.html)

4.4 Data Element Type
The data element type is indicated by a code, as follows: numeric (Nn), decimal
(R), identifier (ID), string (AN), date (DT), time (TM), binary (B) or fixed-
length string (FS). Below is a brief explanation of the Data Element Types.
Please see X12.6 for a full explanation of each data element type.

4.4.1 Numeric Type (Nn)
A numeric is represented by one or more digits with an optional leading sign
representing a value in the normal base of 10. A value of a numeric data
element includes an implied decimal point. It is used when the position of the
decimal point within the data is permanently fixed and is not to be
transmitted with the data. The data element dictionary defines the number of
implied decimal positions. The representation for this data element type is Nn
where "N" indicates that it is numeric, and "n" indicates the number of decimal
positions to the right of the implied decimal point. If n is 0, it need not
appear in the specification; N is equivalent to N0. For negative values, the
leading minus sign (-) is used. Absence of a sign indicates a positive value.
The plus sign (+) should not be transmitted. Leading zeros should be suppressed
unless necessary to satisfy a minimum length requirement. The length of a
numeric type data element does not include the optional sign.

4.4.2 Decimal Type (R)
A decimal data element contains an explicit decimal point and is used for
numeric values that have a varying number of decimal positions. The decimal
point always appears in the character stream if the decimal point is at any
place other than the right end. If the value is an integer (decimal point at
the right end), the decimal point should be omitted. For negative values, the
leading minus sign (-) is used. Absence of a sign indicates a positive value.
The plus sign (+) should not be transmitted. Leading zeros should be suppressed
unless necessary to satisfy a minimum length requirement. Trailing zeros
following the decimal point should be suppressed unless necessary to indicate
precision. The use of triad separators (for example, the commas in "1,000,000")
is expressly prohibited. The length of a decimal type data element does not
include the optional leading sign or decimal point.

4.4.3 Identifier Type (ID)
An identifier data element always contains a value from a predefined list of
values (codes) that is maintained by the ASC X12 Committee or some other body
recognized by the X12 Committee. For the latter, see Appendix A, Code Sources.
Trailing spaces should be suppressed unless necessary to satisfy minimum
length. The intent of this type of data element is to allow the use of computer
tables to validate data element values. Where mutually defined codes such as
"ZZ" are allowed in accordance with this standard, the interchange partners
shall agree on the meaning of this code prior to the interchange. Mutually
defined codes are intended only for temporary use pending the assignment of a
specific code value by the ASC X12 Committee.

4.4.4 String Type (AN)
A string data element is a sequence of any characters from the basic or
extended character sets. The significant characters shall be left justified and
shall be space filled. Leading spaces, when they occur, are presumed to be
significant characters. Trailing spaces should be suppressed unless they
are necessary to satisfy minimum length.

4.4.5 Date Type (DT)
A Date data element is used to express the ISO standard date in the YYMMDD
format in which YY is the year in the century (00-99), MM is the month (01-12),
and DD is the day in the month (01-31)

4.4.6 Time Type (TM)
A time data element is used to express the ISO standard time in HHMMSSd..d
format in which HH is the hour for a 24-hour clock (00-23), MM is the minute
(00-59), SS is the second (00-59) and d..d is decimal seconds. NOTE: The
current Time data element length specification permits only HHMM.

4.4.7 Binary (B)
The binary data element is any sequence of octets ranging in value from binary
00000000 to binary 11111111. This data element type has no defined maximum
length. Actual length is specified by the immediately preceding data element.
The binary data element type may only exist in the Binary segment.

4.4.8 Fixed-Length String (FS)
A fixed-length string is a sequence of any characters from the basic or
extended character sets. This data element type shall be space filled to
satisfy minimum length. Furthermore, it is required that min/max values for any
data element of this type be equal and that a data element of this type be
mandatory in any segment in which it is used. Significant data shall be left
justified (leading spaces are significant, trailing spaces are normally not
significant).

Earl Wertheimer
[EMAIL PROTECTED]
http://www.spe-edi.com



------------------------ Yahoo! Groups Sponsor --------------------~--> 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/0It09A/bOaOAA/yQLSAA/OIFolB/TM
--------------------------------------------------------------------~-> 

...
Please use the following Message Identifiers as your subject prefix: <SALES>, 
<JOBS>, <LIST>, <TECH>, <MISC>, <EVENT>, <OFF-TOPIC>

Job postings are welcome, but for job postings or requests for work: <JOBS> IS 
REQUIRED in the subject line as a prefix. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/EDI-L/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/EDI-L/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to