This section explains how to exchange data between different types of hardware that use different character code sets. Not all machines use the same codes for the characters that are outside of the standard ASCII character set (those whose underlying decimal values are 128 or larger). But you can overcome these differences by setting up a simple character map file and then pointing to your map file with a runtime configuration variable. Character mapping is triggered by the presence (on the client machine) of a configuration variable that points to the map file. Only single-byte alphanumeric characters are mapped.
Mapping might be essential for sites using the AcuServer product to retrieve and store data on a remote server. Sites that use AcuConnect to launch programs on a remote server might need character mapping to ensure that parameter values returned for their CALL statements are correctly translated. Sites using AcuODBC to access Vision data files on a remote machine may need to provide a map file for the client.
The map file is a simple text file that you create with any text editor. You can choose any name for it that you like. It should contain two values on each line. The first value on the line indicates the decimal or hexadecimal value of the character on the client machine. The second value on the line indicates the decimal or hexadecimal value of the corresponding character on the server machine. Hexadecimal values use the standard "0x" notation. For example:
maps "E" (acute) in the IBM PC character set to "E" (acute) in the ISO8859-1 character set.
Only those character codes that differ between the two machines need to be included in the map file. This might include characters with a grave accent, acute accent, circumflex, tilde, umlaut, and so forth.
You can check the values of specific characters by using the Windows Character Map accessory in the PC environment, or by referring to your UNIX man pages in the UNIX environment.
As data moves from the client machine to the server, each alphanumeric character that appears in the first position of a map file entry is mapped to the corresponding second character in that entry. A character coming from the server to the client is mapped in reverse: from the second value listed to the first value listed. Each line in the map file thus sets up a one-to-one mapping.
The map is used to translate only single-byte alphanumeric fields. All group items are treated as alphanumeric, so you may want to restructure them to eliminate numeric fields within the group. Data items that are subject to a REDEFINES clause need to be examined with care. For example, if the data looks like this:
03 customer-info pic x(150). 03 customer-detail redefines customer-info. 05 customer-name pic x(30). 05 customer-code pic 9(20). 05 customer-address1 pic x(25). 05 customer-address2 pic x(25). 05 customer-address3 pic x(25). 05 customer-address4 pic x(25).
then you might need to reorganize or restructure the data definition to ensure that numeric fields are not translated.