Joe,

Speaking for myself only, what you're asking about is not how the X12 
standards treat the "decimal number" data element type, but what your 
application does with it. That's beyond the scope of the X12 standards. 
What might be relevant in this case is how the standard considers zeros 
to the right of the decimal point. X12.6 states in 3.5.1.2:

"Trailing zeros following the decimal point should be suppressed unless 
necessary to indicate precision."

You might therefore assume that if the sender is including zeros to the 
right of the decimal point, that they considered them necessary to 
indicate precision. What your application does with them depends on the 
data type you are mapping to and the assumptions you care to make about 
the data. Personally, all other things being equal I would preserve the 
trailing zeros.

Mike

-----------------------------------------
Michael C. Rawlins, Rawlins EC Consulting
www.rawlinsecconsulting.com



Joe McVerry wrote:
> A client, an ultra large retailer, is having issues with my translator
> converting a real element (type is "R")  value.  The element is
> defined such:
>
> <dataElement name="Unit Price" id="212" sequence="4"               
> description="Price per unit of product, service, commodity, etc."
> type="R" required="X"  minLength="1" maxLength="17"                 
> xmlTag="unitPrice"/>
>
> Incoming the value is "15.00."  The translator outputs the value as
> "15" (sans decimal point and trailing zeros).
>
> Should the translator drop or keep trailing zeros and decimal point
> for outgoing messages?
>
> Is there a definitive X12 specification on how to treat reals?  I
> can't find any rules on reals in any X12 related documentation or website.
>
>
> Thanks in advance,
>
> Joe McVerry
> americancoders.com
>
>
>
> ...
> 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
>
>
>
>
>   


...
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