Flat File Encoding Configuration P93081 starting with EnterpriseOne 8.9

Purpose
Scope
Details
 Overview
 Processing
 P93081 Unicode Flat File Encoding Configuration
 Defining a Character Set
 To activate and deactivate the flat file encoding record
 Flat File Encoding Set up by Role
 Identify the flat file encoding used by the Interactive or Batch application
 No Active Flat File Encoding set up in P93081

Purpose

All data, in release starting 8.9 and later, is represented with Unicode. Unicode, in the simplest terms, is a character set that supports all written languages. Computers today can only support one character set at a time, but Unicode allows all languages to co-exist in a single instance of software. In the past, without Unicode, multiple software instances were required to support multiple languages.

Starting with EnterpriseOne 8.9, Unicode is expected as the default encoding for flat file. Table Conversion, UBE, Business Function uses Unicode when involving with flat text files. A conversion may be necessary when reading and writing flat files. This is due to the fact that while EnterpriseOne is capable of handling Unicode file the correct character set must still be defined. There may be business requirements to generate flat files in specified encodings. For examples, CSV files sent to BANKs may be required to specific encoding standard. Same applies for reading flat files received from other systems.

This document discusses this functionality and ways to use different encoding like ASCII, IBM-37, UTF-8 etc.

Scope

This document is intended for the EnterpriseOne CNC system administrator or power user.

Details

Overview

Starting with EnterpriseOne 8.9, all data will now be represented with Unicode. Unicode, in the simplest terms, is a character set that supports all written languages. Computers today can only support one character set at a time, but Unicode allows all languages to co-exist in a single instance of software. In the past, without Unicode, multiple software instances were required to support multiple languages.

Processing

A conversion may be necessary when reading and writing flat files. This is due to the fact that while EnterpriseOne 8.9 is capable of handling Unicode file the correct character set must still be defined. This enhancement provides application P93081 that provides a mechanism to control this conversion to allow the reading and writing of flat files in a given character set as defined in P93081. Due to the fact that EnterpriseOne uses Unicode and not all third-party software does, there is a process handled though an API that will determine if an inbound or outbound flat file will need to have the character set changed. During this process the software converts the flat file into the Unicode character set or back into the original character set. In the jdeCallObject API there is a parameter called LpBhvrCom that contains information to query the Unicode Flat File Encoding Configuration table (F93081) for the flat file encoding. This table is populated and configured by the Unicode Flat File Encoding Configuration program (P93081). You can assign the conversion character set applied to a flat file based on the user or role, the environment, the program id and version. This can be done by activating a flat file encoding record.

P93081 Unicode Flat File Encoding Configuration

Using the Unicode Flat File Configuration application P93081, you create records for a table that specifies what character sets are used for programs based on the user or role, program ID, program version, and the environment. When the intercepting occurs the intercept program calls the table, searches it and applies the record.

The primary users for Unicode Flat File Encoding Configuration are power users and system administrators.

Before setting up a flat file encoding record you need to know the encoding of the flat file being transferred. You also need to know the user or role, program, program version, and environment that is calling the flat file. To ensure that all files are encoded to your primary character set set up a default flat file encoding record for your primary character set and then any exceptions. The system applies the more specific records before the more general records. The default record is only used if no other records apply to the incoming flat file.

The following list shows the character set currently supported and they can be found in UDC H95/FE.

Encoding Name Description
BIG5 Chinese, Traditional
CP1250 WIN-Latin2, Central Europe
CP1251 WIN-Cyrillic
CP1252 WIN-Latin 1, Western European (ANSI/ASCII)
CP1253 WIN-Greek
CP1254 WIN-Latin5, Turkish
CP1256 WIN-Arabic
GB18030 (starting from tools release 9.1) Chinese, National Standard
GB2312 Chinese, Simplified
IBM-1123 EBCDIC-Cyrillic
IBM-37 EBCDIC-Latin 1 or Western Euro
IBM-420 EBCDIC-Arabic
IBM-858 # PC latin1 with Euro
IBM-933 EBCDIC-Korean
IBM-935 EBCDIC-Simplified Chinese
IBM-937 EBCDIC-Traditional Chinese
IBM-939 EBCDIC-Japanese
KSC-5601 Korean
SHIFT_JIS WIN-Japanese
UCS2 UTF16_BE / UTF16_LE (dependent on Server platform)
UTF-16BE UTF-16BE
UTF-16LE UTF-16LE
UTF8 UTF8

Note that to produce output file in CP1252 or in an encoding that uses only 7 or 8 bits, if you have Japanese character or Chinese character or characters that need multi bytes, they will be replaced by hex value 1A and you will see it as (SUB) in the text file.
Notepad++ cannot differentiate whether a file is in CP1252 or UTF8, because JDE does not create files with BOM. Because of this, both file types look the same for notepad++. When there is no double/multi byte character, both UTF8 and CP1252 file types are identical. When there are multi byte characters, CP1252 will show (SUB). Hence the selected encoding in notepad++ or the ASCII vs UTF8 options which appear while saving a text file, are not full proof evidence of file encoding .
See https://en.wikipedia.org/wiki/UTF-8


Defining a Character Set

In order to define a character set that is applied to a flat file during the intercept process, you need to add a flat file encoding record. You can add flat file encoding file based on the user/role, environment, program id and version. After you add the flat file encoding record, you must activate it.

From the System Administration Tools task view choose Unicode Flat File Encoding Configuration (P93081)

  1. On Work With Flat File Encoding form, click Add
  2. On Flat File Encoding Revisions form, complete the following fields and then click the OK button :
    1. User/Role
    2. Environment
    3. Program ID
    4. Version
    5. Encoding Name

After adding the flat file encoding record you must activate it before it will be applied to incoming and outgoing flat files.

To activate and deactivate the flat file encoding record

  1. On the Work With Flat File Encoding form, click Find to display the flat file encoding records.
  2. Highlight the flat file encoding record to activate or deactivate.
  3. From the Row menu, choose Change Status.

Flat File Encoding Set up by Role

Flat file encoding by Role does not function until tools release 8.98.1.2 where the functionality was fixed via Bug 10988453 Flat File Encoding by Role.

When the user signs in :

The active flat file encoding record found for the specific role is used.
If there is only 1 role included in *ALL, the active flat file encoding record found for that role is used.

If there are active flat file records for the multiple roles included in *ALL, the record for the role with the Higher role sequence is used.

Identify the flat file encoding used by the Interactive or Batch application

A message about the flat file encoding used is written in the jdedebug log file when logging is turned on for the interactive or batch application.

Sample messages :

Encoding AAA found in cache for user XXX environment YYY, application ZZZ, version VVV.

No encoding found for user XXX environment YYY, application ZZZ, version VVV, use UCS2 (utf-16be).

No encoding found for user XXX environment YYY, application ZZZ, version VVV, use UCS2 (utf-16le).


No Active Flat File Encoding set up in P93081

If no Active flat file encoding record is found, the table conversion engine applies the default encoding UCS2 ( UTF16_BE or UTF16_LE dependent on the server platform), which is a Unicode character set.

If the flat file data encoding does not match the P93081 flat file encoding, the table conversion engine generates one or more of the errors below:

Table Conversion Error Codes