• No results found

Formatting Flat File Data for Outbound Documents

Depending on the capabilities in the translator software that you use, you might have to specify how the data should be formatted in the flat file when running the Outbound Flat File Conversion program from the EDI outbound interface tables into the flat file.

Each record within a flat file must be consistent in record length and field position. Most EDI translator software packages read the data positionally within each record, and if the data

varies in length and field position, most fields will not be read correctly by the translator software.

Dates

How a date is formatted in a flat file when you run the Outbound Flat File Conversion program is based on a combination of the Date Format user preference that you set up in OneWorld and the default value for Century Change Year (CENTCHG in UDC 00/DF). When the OneWorld Date Format user preference is MDY (month, day, year), YMD (year, month, day), or DMY (day, month, year), the Outbound Flat File Conversion program uses the default value for CENTCHG to determine whether the year (Y) portion of a date is four digits or two digits. If the year being processed by the Outbound Flat File Conversion program is less than or equal to the CENTCHG default value, the system converts the year in the flat file as two digits. If the year being processed by the Outbound Flat File Conversion program is greater than the CENTCHG default value, the system converts the year in the flat file as four digits.

For example, if the default value for the CENTCHG item is 15 and the Date Format user preference is MDY, the following formatting occurs in the Outbound Flat File Conversion:

Date to be formatted Typical Interface Table Format (Julian Dates) Converted Value in Flat File

May 14, 1998 98134 05/14/98

December 12, 2014 114346 12/12/14

December 12, 2015 115346 12/12/15

December 12, 2016 116347 12/12/2016

Blank Date 0 00/00/00

Note

Date formats for month, day, and year should always be converted as two digits for the month, two digits for the day, and two or four digits for the year. If your EDI translator software reads any flat file record positionally, you must select a specific Date Format user preference in One World for the user profile that uses the Flat File Conversion program. If the Date Format user preference is left blank, the date that is displayed is based on the system default and the months and days from one to nine is output as only one position. For example, May 14, 1998 is output as 5/14/98.

You can also set the year portion of the date so that it will always be output as four digits in the flat file when you run the Flat File Conversion program. To do this:

1. Set up a custom Date Format in user defined code table 00/DF as MDE (month, day, four-digit year). This is a predefined date format that the Flat File Conversion

program uses to cause the date to always be displayed as four digits. The order of the date in the custom Date Format can be changed in order to output the desired date format, such as DME (day, month, year), EMD (year, month, day), and so on.

2. Assign this custom Date Format to the Date Format user preference in OneWorld.

For example, if you set the date formatting so that it is always output as four digits, the

following date formatting will occur when running the Outbound Flat File Conversion program:

Date to be formatted Typical Interface Table Format (Julian Dates) Converted Value in Flat File

May 14, 1998 98134 05/14/1998

December 12, 1998 98346 12/12/1998

December 12, 2015 115346 12/12/2015

December 12, 2016 116347 12/12/2016

Blank Date 0 00/00/0000

See Also

Customizing User Defined Codes in the OneWorld Foundation Guide for information about how to set up UDC 00/DF for the date format that you want

Numeric Values

The Flat File Cross-Reference program always outputs numeric fields as 32 positions. The first position indicates the sign of the subsequent value. A 0 (zero) indicates the following number is positive and - indicates that the following number is negative. The next 20 positions indicate the whole number portion of the value, followed by a separator, trailed by 10 digits that indicate the decimal portion of the value. The separator character is based on the setting in the Decimal Format Character user preference. Typically in North America, this value is a period. Numeric values are always output in this format, regardless of whether the field in the EDI outbound interface table is stored with a decimal.

For example if you have the following values in the EDI outbound interface tables, they will be output into the flat files as shown:

Value in Interface Table Format in Flat File

1 or 1.0 "000000000000000000001.0000000000"

100686.54 "000000000000000100686.5400000000"

100686.54- "-00000000000000100686.5400000000"

0 "00000000000000000000000000000000"

When you are sending or receiving documents with decimal numbers, you must use a place holder such as a period (.) or a comma (,) to indicate the position of the decimal. You define the place holder in the use preference table.

Character Values

Character strings are output from the EDI outbound interface tables to the flat file and are padded with blank spaces out to the number of positions of the field. Typically, these fields are always left justified in the field. However, a few exceptions exist, such as the data

dictionary item Business Unit (MCU), which is right justified just as it appears in the actual field. Fields that are blank are padded with blanks.

The following information shows character strings that are output from the EDI outbound interface tables to the flat file:

Value in Interface Table Interface Table Field and Attributes Format in Flat File F47047 ZAFILE in F4714 - Alpha 10 "F47047 "

30 SYMCU in F47046 - Alpha 12 " 30"

A blank field in any F47 table. " "

Example: Formatting Flat File Data for Outbound Documents The following examples illustrate correctly formatted flat file data:

"1","000000000000000000001.0000000000","00001","00000000000000010005.0000000000

","IN"

"3","000000000000000000002.0000000000","00001","000000000000000100035.000000000 0","IN"

"2","000000000000000000001.0000000000","00001","000000000000000100035.000000000 0","IN"

"4","000000000000000000002.0000000000","00001","000000000000000100035.000000000 0","IN"

"2","000000000000000000001.0000000000","00001","000000000000000100035.000000000 0","IN"

"4","000000000000000000002.0000000000","00001","000000000000000100035.000000000 0","IN"

Daily