EDI Connect User's Guide

APPENDIX F

EDI Data Type Validation Rules

The SEF import loses datatype information and type information is not fully utilized during the conversion process. In order to solve this problem, modify the SEF import code so all datatype information is preserved. Apply the datatypes rules outlined below for both Inbound and Outbound processing.

 
Top of section

Inbound and Outbound Rules


Datatype

Verification

DT

date is in format YYMMDD, CCYYMMDD, YYMMDD-YYMMDD, or CCYYMMDD-CCYYMMDD

TM

HHMM, HHMMSS, HHMMSSD, or HHMMSSDD

where HH is Hour 0-23

MM is Minutes 0-59

SS is seconds 0-59

D is tenths 0-9

DD is hundredths 0-99

N*

Verify numeric

Note: If the rule is violated, then an EDI exception occurs.

 
Top of section

Inbound Processing — Implied Decimal Point Processing

Datatype

Verification

N*

Add a decimal point to the field at the index specified (i.e. N1 applied to "100" yields "10.0." If a decimal point already exists, the converter sends an exception. Note: The maximum field length rule shall not count the decimal point. N3 applied to "2" yields "0.002."

If the format numeric checkbox is not checked, move the data in unchanged.

If the checkbox is checked or unchecked, and a decimal point exists in the EDI field, the converter sends an exception.

 
Top of section

Outbound Processing — Padding and Truncating

Datatype

Verification

AN

If the auto pad alphanumeric is checked,

If <minLength, fields are padded with blanks on right.

If >maxLength, fields are truncated on right.

N*

If the auto pad numeric is checked,

If <minLength, fields are padded with zeroes on left.

If >maxLength, fields are truncated on left.

Note: No padding or truncating is performed with Inbound Processing.


 
Top of section

Outbound Processing — Implied Decimal Point Processing

Datatype

Verification

N*

If the Treat Numeric Fields as requiring fixup, remove decimal point from number, fixing up the result to proper format for implied decimal point. If the decimal point is not at the correct location, assume the number is correct, pad the result with zeroes to correctly account for the implied decimal point, if possible. If not, an exception occurs and a loss of significant digits in the process. (i.e. N1 applied to either "100" or "1.00" yields "100", but applied to "10.0" is when an exception occurs.) The error message contains the offending value and the format along with a message explaining that implied decimal point processing yields loss of precision.


If the Treat Numeric Fields as requiring fixup is not checked, and the decimal point in the number, the converter sends an exception. If there is no decimal point in the number and there are only digits, move the number into the EDI transmission unchanged.
















Copyright © 2003 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.  more ...