Flat File Business Documents

The data types that you can apply depend on the data class. In turn, the possible data classes depend on the structure type of the Business Document. For more information, see Business Document structure, Business Documents, and Axway Mapping Services DML Reference Guide

Data class Data type Definition field Physical
length
Plus sign
in inputs
Plus sign
in outputs

Boolean

Boolean [false,true]

5

5 N/A N/A

Boolean [0,1]

1

1 N/A N/A

Date & Time

Date [YYYYMMDD]

8 (indicates a date)

8 N/A N/A

Date [YYMMDD]

6 (indicates a date)

6 N/A N/A

Date [YYYY/MM/DD]

10 (indicates a date)

10 N/A N/A

Date [YY/MM/DD]

8 (indicates a date)

8 N/A N/A

Date [DD/MM/YYYY]

10 (indicates a date)

10 N/A N/A

Date [DD/MM/YY]

8 (indicates a date)

8 N/A N/A

customDate

define your own pattern

equal to number of characters in pattern N/A N/A

Integer

Integer (p)

10

P+1 Mandatory ...

...always
generated

customInteger

define your own pattern

P+1

Optional. If plus sign = left or Right
AND is activated...

...not generated if activated OR if = None

  P+1 Mandatory. If plus sign = Left or Right AND is activated... ...generated if activated OR if = None
  N/A Forbidden if = None N/A

Real number

Numeric (p,s)

Fixed scale Real

numeric (p)

Variable scale
Real

18,6

P+2

Mandatory ...

...never generated

customNumeric

define your own pattern

P+2 N/A N/A
customNumeric (n,v)

Customizable Virtual scale Real

6,2; pattern = n,v P+1 Optional. If plus sign = left or Right
(optional plus sign is always activated)...

... generated

N/A Forbidden if = None N/A

virtualNumeric (n,v)

Virtual scale Real

6,2; pattern = n, v

P+1

Optional...

(optional plus sign is always activated)...

...never generated

customNumeric (p,s)

Fixed scale Real

customNumeric (p)

Variable scale Real

6,2; pattern = p,s P+2 Optional. If plus sign = Left or Right
AND is activated...

...not generated if activated OR if

= None

P+2 Mandatory. If plus sign = Left or Right AND is activated... ...generated if activated OR if = None
N/A Forbidden if = None N/A

String

String (len)

255

255 N/A N/A

customString

define your own pattern

define your own pattern N/A N/A

Very
large object

largeBinary (lg)

255

255 N/A

N/A

Regarding zeros:

  • If the data type calls for an explicit number of decimal places, and there are all zeros to the right of the decimal sign, a valid value is output. In this case, other data types generate an error.
  • Leading zeros are required for Application Flat File fields that are numeric or Real to satisfy the field length requirements. EDI elements should never contain leading zeros, with the exception of fraction values, or to satisfy minimum length requirements.
Note For customNumeric virtual scale Real numbers, if the plus sign is not present in input or output fields, it can be replaced by any digit. There is one additional character authorized for Real numbers without plus sign.

For more information on Flat File Business Documents, see Define Flat File Business Documents.

Numeric attribute example

When reading numeric(p,s):

  • The Real value has always decimal separator.
  • The plus sign is always present.
  • The minus sign is always present.

When writing numeric(p,s):

  • The decimal separator is always generated. (Except if there are other environment attributes that override this behavior)
  • The plus sign is always generated
  • The minus sign is always generated.

VirtualNumeric attribute example

You can map input numbers that meet all of the X12 requirements into output numbers for a Flat File Business Document using the (n,v) pattern. For additional information, see Set node attributes values.

When reading virtualNumeric (n,v) input:

  • The Real value has no decimal separator.
  • The plus sign is optional and can be replaced with any digit.
  • The minus sign is mandatory for a negative value.
  • If the scale part defined in the type is equal to zero, it means that there is no decimal part for the Real value.

When writing virtualNumeric output:

  • The decimal separator is not generated for the output.
  • If the Real value has a Positive value, the plus sign must be omitted and replaced by any digit.
  • The minus sign is mandatory for a negative value.
Note For Variable fields, there is no justification for Real value. The value is written with significant digits.

CustomNumeric attribute example

You can map input numbers that meet all of the X12 requirements into output numbers for a Flat File Business Document using the (p,s) pattern. For additional information, see Set node attributes values.

When reading customNumeric input:

  • The Real value has no decimal separator.
  • The plus sign is optional and can be replaced with any digit.
  • The minus sign is mandatory for a negative value.
  • If the scale part defined in the type is equal to zero, it means that there is no decimal part for the Real value.

When writing customNumeric output:

  • The decimal separator is not generated for the output.
  • If the Real value has a positive value, the plus sign must be omitted and replaced by any digit.
  • The minus sign is mandatory for a negative value.
Note For Variable fields, there is no justification for Real value. The value is written with significant digits.

CustomNumeric attribute example

You can map input numbers that meet all of the X12 requirements into output numbers for a Flat File Business Document using the (p,s) pattern. For additional information, see Set node attributes values.

When reading customNumeric input:

  • The Real value has a decimal separator.
  • The plus sign is optional and can be replaced with any digit.
  • The minus sign is mandatory for a negative value.
  • The scale part is optional, where the x of Rx is omitted. This means that the decimal part is variable and could be equal to the maximum of the precision.

When writing customNumeric output (for fixed length fields):

  • The decimal separator is generated for the output value.
  • If the Real value is a positive value, the plus sign must be omitted and replaced by any digit.
  • The minus sign is mandatory for a negative value.
Note For Variable fields, there is no justification for Real value. The value is written with significant digits.

You can use both Real and Integer numbers to create an Inhouse (Flat file) Business Document and use the values in the following tables to represent the data types from the X12 standard.

For Fixed field type N, N0, Nx

Data type N,N0 N2 N,N0 N2 N2
Properties > General
Pad Reals with a leading
and trailing zero
Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon

Keep decimal separator
character

Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon
Keep decimal separator Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon

Keep + sign for positive
Real numbers

Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon

Keep + sign for positive
Integer numbers

Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon
Business Document Leaf elements
Class (R=Real, I=Integer)

I

R R R R
Data type (V=virtualNumeric, C=customNumeric,
I=customInteger)
I (2) V (2) C (2) V (2) C (2)
Pattern p n,v n,v n,v n,v
Definition 5 5,0 5,0 5,2 5,2
Delimiter Fixed Fixed Fixed Fixed Fixed
Delimiter value leave it blank leave it blank leave it blank leave it blank leave it blank
Properties > Attributes  
Optional plus sign(3) Unchecked box icon Unchecked box icon Checked box icon Unchecked box icon Checked box icon
Plus sign position(4)

leave it blank

leave it blank

None or Left

leave it blank

None or Left

Justification

leave it blank

leave it blank

RIGHT

leave it blank

RIGHT

Padding character

leave it blank

leave it blank

0

leave it blank

0

Keep number of
fractional digits

Unchecked box icon

Unchecked box icon

Unchecked box icon

Unchecked box icon

Unchecked box icon

Keep decimal separator
character
Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon
Keep decimal separator Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon
Keep + sign for positive
numbers, Real or Integer
Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon
Input value 01200
01200
01200
01200
01200
Output value 01200
01200
01200
01200
01200
Input value +1200 +1200 +1200 +1200 +1200 (5)
Output value 01200 01200 01200 01200 error, no output
Input value -1200 -1200 -1200 -1200 -1200
Output value -1200 -1200 -1200 -1200 -1200
Input value 11200 11200 11200 11200 11200
Output value 11200 11200 11200 11200 11200
Input value 11222 11222 11222 11222 11222
Output value 11222 11222 11222 11222 11222

(1) Does not apply.

(2) The virtualNumeric with pattern=n,v data types cannot be customized. The customNumeric with pattern=n,v can be customized by changing the pattern, the padding character, and formatting option for the plus sign and minus sign.

(3) For input value, this option allows the plus sign to be replaced by a digit for reading. In a case with a precision of 5,2, it allows for a Positive value to read 12345.

(4) Define the position of the plus sign when read or generated. In this case, it must be LEFT or NONE.

(5) Unable to read the data: [CVN - 9012): Invalid sign position.

(6) Does not apply.

Note When you define your flow, you must deselect the Keep exact value of input option.

For Fixed field type R, R2

Data type R R2
Properties > General
Pad Reals with a leading
and trailing zero
Unchecked box icon Unchecked box icon

Keep decimal separator
character

Unchecked box icon Unchecked box icon
Keep decimal separator Unchecked box icon Unchecked box icon

Keep + sign for positive
Real numbers

Unchecked box icon Unchecked box icon

Keep + sign for positive
Integer numbers

Unchecked box icon Unchecked box icon
Business DocumentLeaf elements
Class (R=Real, I=Integer)

R

R
Data type (V=virtualNumeric,
C=customNumeric)
C (2) C (2)
Pattern p p,s
Definition 5 5,2
Delimiter Fixed Fixed
Delimiter value leave it blank leave it blank
Properties > Attributes
Optional plus sign(3) Checked box icon Unchecked box icon
Plus sign position(4)

Left

leave it blank

Justification

Right

leave it blank

Padding character

0

leave it blank

Keep number of
fractional digits

Unchecked box icon

Unchecked box icon

Keep decimal
separator character
Unchecked box icon Unchecked box icon
Keep decimal separator Unchecked box icon Unchecked box icon
Keep + sign for positive
numbers, Real or Integer
Unchecked box icon Unchecked box icon
Input value

1234567

0123.45

Output value 1234567

0123.45

Input value 12345.7 1234.56
Output value 12345.7

1234.56

Input value 1234.67 +123.45
Output value 1234.67 123.45
Input value 123.567  
Output value 123.567  
Input value 12.4567  
Output value 12.4567  
Input value

1.34567

 
Output value 1.34567  
Input value .234567(6)  
Output value error, no output  

(1) Does not apply.

(2) The virtualNumeric with pattern=n,v data types cannot be customized. The customNumeric with pattern=n,v can be customized by changing the pattern, the padding character, and formatting option for the plus sign and minus sign.

(3) For input value, this option allows the plus sign to be replaced by a digit for reading. In a case with a precision of 5,2, it allows for a positive value to read 12345.

(4) Define the position of the plus sign when read or generated. In this case, it must be LEFT or NONE.

(5) Does not apply.

(6) Unable to read the data: [CVN - 9022): Scale part is too long (6), defined length is 5.

Note When you define your Mapping Flow, you must deselect the Keep exact value of input option.

For Variable field type N, N0, Nx

Data type N,N0 N2 N,N0 N2 N2
Properties > General
Pad Reals with a leading and trailing zero(1) Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon

Keep decimal separator
character

Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon
Keep decimal separator Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon

Keep + sign for positive
Real numbers

Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon

Keep + sign for positive
Integer numbers

Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon
Business DocumentLeaf elements
Class (R=Real, I=Integer)

I

R R R R
Data type (V=virtualNumeric, C=customNumeric, I=customInteger) V (2) V (2) C (2) V (2) C (2)
Pattern P n,v n,v n,v n,v
Definition 5 5,0 5,0 5,2 5,2
Delimiter String String String String String
Delimiter value # # # # #
Properties > Attributes
Optional plus sign(3) Unchecked box icon Checked box icon Checked box icon Checked box icon Checked box icon
Plus sign position(4)

leave it blank

None

None

None

None

Justification

leave it blank

RIGHT

RIGHT

RIGHT

RIGHT

Padding character

leave it blank

0

0

0

0

Keep number of
fractional digits

Unchecked box icon

Unchecked box icon

Unchecked box icon

Unchecked box icon

Unchecked box icon

Keep decimal
separator character
Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon
Keep decimal separator Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon
Keep + sign for positive
numbers, Real or Integer
Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon Unchecked box icon
Input value

1200#

1200# 01200#
01200#
01200#
Output value 01200#
1200# 1200#
1200#
1200#
Input value +1200# +1200# +1200# +1200# +1200# (5)
Output value error, no output error, no output error, no output error, no output error, no output
Input value -1200# -1200# -1200# -1200# -1200#
Output value -1200# -1200# -1200# -1200# -1200#
Input value 11200# 11200# 11200# 11200# 11200#
Output value 11200# 11200# 11200# 11200# 11200#
Input value 11222# 11222# 11222# 11222# 11222#
Output value 11222# 11222# 11222# 11222# 11222#

(1) This option is used to generate the non-significant digit on the right side or left side of the decimal separator. For example, if you have a canonical value of:

  • .2 a zero is generated on the left (0.2).
  • 2. a zero is generated on the right (2.0)

(2) The virtualNumeric with pattern=n,v data types cannot be customized. The customNumeric with pattern=n,v can be customized by changing the pattern, the padding character, and formatting option for the plus sign and minus sign.

(3) For input value, this option allows the plus sign to be replaced by a digit for reading. In a case with a precision of >5,2, it allows for a positive value to read 12345.

(4) Define the position of the plus sign when read or generated. In this case, it must be LEFT or NONE.

(5) Unable to read the data: [CVN - 9012): Invalid sign position.

(6) Does not apply.

Note When you define your flow, you must deselect the Keep exact value of input option.

For Variable field type R, R2

Data type R R2
Properties > General
Pad reals with a leading
and trailing zero
Unchecked box icon Unchecked box icon

Keep decimal separator character

Unchecked box icon Unchecked box icon
Keep decimal separator Unchecked box icon Unchecked box icon

Keep + sign for positive
Real numbers

Unchecked box icon Unchecked box icon

Keep + sign for positive
Integer numbers

Unchecked box icon Unchecked box icon
Business Document Leaf elements
Class (R=Real, I=Integer)

R

R
Data type (V=virtualNumeric,
C=customNumeric)
C (2) C (2)
Pattern p p,s
Definition 5 5,2
Delimiter String String
Delimiter value # #
Properties > Attributes
Optional plus sign(3) Checked box icon Checked box icon
Plus sign position(4)

None

None

Justification

leave it blank

leave it blank

Padding character

leave it blank

leave it blank

Keep number of fractional digits

Unchecked box icon

Unchecked box icon

Keep decimal separator character Unchecked box icon Unchecked box icon
Keep decimal separator Unchecked box icon Unchecked box icon
Keep + sign for positive
numbers, Real or Integer
Unchecked box icon Unchecked box icon
Input value

1234567#

0123.45#

Output value

1234567#

0123.45#
Input value 12345.7# +123.45#
Output value 12345.7#

123.45#

Input value 1234.67# 1234.56#
Output value 1234.67#

1234.56#

Input value 123.567#  
Output value 123.567#  
Input value 12.4567#  
Output value 12.4567#  
Input value

1.34567#

 
Output value

1.34567#

 
Input value .234567# (6)  
Output value

.234567#

 

(1) Does not apply.

(2) The virtualNumeric with pattern=n,v data types cannot be customized. The customNumeric with pattern=n,v can be customized by changing the pattern, the padding character, and formatting option for the plus sign and minus sign.

(3) For input value, this option allows the plus sign to be replaced by a digit for reading. In a case with a precision of 5,2, it allows for a positive value to read 12345.

(4) Define the position of the plus sign when read or generated. In this case, it must be LEFT or NONE.

(5) Does not apply.

(6) Unable to read the data: [CVN - 9022): Scale part is too long (6), defined length is 5.

Note When you define your Mapping Flow, you must deselect the Keep exact value of input option.

Variable length output fields with a fixed decimal point position for DML version 2.0

Set the following values:

  • The project's DML version to 2.0.
  • The Justification to Right
  • The Field to Variable; the Delimiter to String

If the output field has the fixed position of the decimal point defined, and the input value has less decimal places than the output value defined, the empty decimal places of the output are padded with zeros.

Data
type
Field size Input value   Data
type
Field size Output value
R min 1, max 10 120 Map arrow icon R2 Application
(delimited)
120.00
R min 1, max 10 -120 Map arrow icon R2 Application
(delimited)
-120.00
N2 min 1, max 9 12056 Map arrow icon R2 Application
(delimited)
120.56
N1 min 1, max 9 12056 Map arrow icon R2 Application
(delimited)
1205.60
N2 min 1, max 15 12056 Map arrow icon R1 Application
(delimited)
120.5 (use MD truncation)
N2 min 1, max 15 -12056 Map arrow icon R1 Application
(delimited)
-120.5 (use MD truncation)

Change optional plus sign

To update the value of the optional plus sign for all or certain elements, use the Find/Replace functionality in the Business Document:

  1. Press CTRL+F.
  2. In the Find/Replace dialog box, click More.
  3. Click Add if you need to include additional find criteria in the Attribute-Value table. If you want to replace all of the elements, regardless of their type or attributes, leave the table empty.
  4. In Replace, select Optional plus sign.
  5. In With, select either True or False.
  6. Click Replace All.
Note The Replace functionality works for all elements that match any criteria you selected if the Optional plus sign attribute is editable. Attributes that are not editable are shown in gray in the Properties view of a Business Document.

Related topics

Business Document types

Define Flat File Business Documents

Business Document structure

Business Documents

Related Links