Field type conversion rules

The table below shows the combinations of input and output data types supported by DataMagic.

Table 4.10 Field type conversion rules

 

Output data field type

E

N

M

B

9

P

S

F

I

D

Z

W

CSV
string

CSV
numeric value

XML
string

XML
numeric value

TXT
character string

Input data field type

E

A

E

A

A

A

A

A

A

A

A

A

A

A

-

A

A

-

N

E

A

A

E

E

E

E

E

A

A

E

A

A

-

A

E

-

M

B

B

A

A

A

A

A

A

A

A

A

A

A

-

A

A

-

B

A

E

A

A

A

A

A

A

E

A

A

A

-

A

A

A

-

9

A

E

A

A

A

A

A

A

E

A

A

A

-

A

A

A

-

P

A

E

A

A

A

A

A

A

E

A

A

A

-

A

A

A

-

S

A

E

A

A

A

A

A

A

E

A

A

A

-

A

A

A

-

F

A

E

A

A

A

A

A

A

E

E

A

A

-

A

A

A

-

I

E

E

E

E

E

E

E

E

A

E

E

E

A

-

E

E

-

D

B

E

A

E

E

E

E

E

A

A

E

A

A

-

A

A

-

Z

A

E

A

A

A

A

A

A

E

A

A

A

A

A

A

A

-

W

B

B

A

A

A

A

A

A

A

A

A

A

A

-

A

A

-

CSV
string

B

B

A

A

A

A

A

A

A

A

A

A

A

-

A

A

-

CSV
numeric value

A

E

A

A

A

A

A

A

E

A

A

A

-

A

A

A

-

XML
string

B

B

A

A

A

A

A

A

A

A

A

A

A

-

A

A

-

XML
numeric value

A

E

A

A

A

A

A

A

E

A

A

A

-

A

A

A

-

TXT
character string

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

A

A

:

Data attribute conversion and data size changes are performed.

B

:

Conversion behavior differs depending on the kanji encoding type or data used for input and output. For details, see Notes on converting the different field types.

E

:

Cannot be converted (an error occurs).

-

:

Cannot be converted (the combination cannot be specified).

= Remarks =

A fixed value is handled as type M.

Note

Character strings that meet the following conditions cannot be converted to numeric values and will generate an error, even if Treat conversion of character strings to numeric values as an error is not set.

  • The character string includes fullwidth numbers.

  • The character string includes characters other than halfwidth numbers, the decimal point, and the negative sign.

  • The character string includes two or more decimal points or negative signs.

  • Characters other than the first character in the character string include a negative sign.