Setting output format

DataMagic enables conversions by specifying the output format in the mapping information.

This section uses examples to explain the formats that can be specified. You can select the format in the Set Mapping Information screen, in Format of Output format. There are restrictions on the output data, depending on the settings. For details about output formats, see DataMagic Reference Manual.

(1) Date format

This subsection explains examples of the date format.

If the input data is not a date, a conversion error occurs.

Table 3.6 Examples of using the date format

Input data

Mapping information (output format) 

Output data

Format

20071001

YYYY/MM/DD HH:MI:SS

2007/10/01 00:00:00

EEYY年mm月dd日

平成19年10月1日

EYY.MM.DD

H19.10.01

MM/DD

10/01

(2) Numeric character string format

This subsection uses examples to explain how the output data varies depending on the setting of the numeric character format.

Table 3.7 Examples of using numeric character string format 1 (sign output)

Input data

Mapping information (output format)

Output data

Sign output

-1234

Add to negative values only

-1234

Add nothing (absolute value)

1234

Add to both positive and negative values

-1234

1234

Add to negative values only

1234

Add nothing (absolute value)

1234

Add to both positive and negative values

+1234

Table 3.8 Examples of using numeric character string format 2 (significant digits after the decimal point and the handling of digits after the last significant digit)

Input data

Mapping information (output format) Format

Output data

Significant digits after the decimal point

Handling of digits after the last significant digit

56.789

Undefined

56.789

2

Round to the nearest value (up for 5 and above)

56.79

Round up

56.79

Round down

56.78

Table 3.9 Examples of using numeric character string format 3 (digit delimiter)

Input data

Mapping information (output format)

Output data

Digit delimiter

123456789

Add

123,456,789

Do not add

123456789

Table 3.10 Examples of using numeric character string format 4 (padding method and padding size)

Input data

Mapping information (output format) 

Output data(#1)

Padding size

Padding method

5678

Undefined

5678

8

Left-justified

5678△△△△

Right-justified and padded with zeros (0)

00005678

Right-justified and padded with spaces

△△△△5678

3

Left-justified

5678

Right-justified and padded with zeros (0)

Right-justified and padded with spaces

#1

:

△ represents a halfwidth space.

(3) Character string format

This subsection explains examples of the character string format.

Table 3.11 Examples of using the character string format

Input data (#1)

Fixed/variable length (#2)

Mapping information (output format)

Output data (#1)

Output method

Output size (#4)

あいうえお

Fixed length

Right-justified

5

△えお

ABCDE

3

CDE

ABCDE

Variable length (#3)

10

△△△△△ABCDE

ABCDE

3

ABCDE

ABCDE△

10

△△△△△ABCDE

あいうえお

Fixed length

Left-justified

5

あい△

ABCDE

3

ABC

ABCDE

Variable length (#3)

10

ABCDE△△△△△

ABCDE

3

ABCDE

△ABCDE

10

ABCDE△△△△△

#1

:

△ represents a halfwidth space.

#2

:

To be specified with the layout information on the output side.

#3

:

If Format is Format, Multi Format or Hierarchy Format, Variable length becomes Variable length (delimiter specified) or Variable length (field name specified).

#4

:

If the data is variable length, you can specify Output size.

If the data is of fixed length, the size specified in the layout information for the output data is displayed in Output size. If you specify No. of bytes in Field information (output side) in the mapping information, the specified value is displayed.