In Distributed Processing

If you anticipate passing any items with special characters (such as vowels with a grave accent, acute accent, circumflex, or tilde) during a remote CALL, you should create a map file to reconcile the character encoding for you. You should also consider creating a map file if the client machine uses a different character set from the server machine. The map file should specify which client characters are to be converted to which values before passing the CALL's arguments to the server process or returning information from the server process. The translation on returning data will affect items that were passed to the server process as "BY REFERENCE" (the default).

The map file should re-map only those values that vary between the two character sets. It should contain two values per line: the first indicating the decimal or hexadecimal value of the special character on the client machine, and the second indicating the decimal or hexadecimal value of the corresponding character on the server machine. 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.

In your character map, hexadecimal values should use the standard "0x" notation. For example:

0x90 0xC9

maps "E" (acute) in the IBM PC character set to "E" (acute) in the ISO8859-1 character set using0x90 0xC9 hexadecimal notation.

144 201

gives the same mapping using decimal notation.

You can use the pound sign (#) to indicate a comment, if desired.

Note that the map will be used to translate only alphanumeric fields, but it will translate all alphanumeric fields, including group items and items subject to a REDEFINES clause. If this is not a desired behavior, you may need to restructure your program to avoid these clauses by passing the elementary items instead of the group item, or passing an item from the REDEFINES clause instead of the first reference.

For example, if you pass the group-name in the following COBOL program:

01 group-name
   03 field-1   pic99 comp-5.
   03 field-2   pic99 comp-5.
call "sun3:/usr/obj/prog2" using group-name.

translation will occur on the elementary numeric items. If these numeric items contain binary data that matches the value of mapped characters, the data will be corrupted. To correct this situation, you could change the CALL statement to:

call "*sun3:/usr/obj/prog2" using field-1, field-2.

Or you could change the definition of the numeric items to a type that will not conflict with potentially mapped characters, as in:

01 group-name
   03 field-1   pic99.
   03 field-2   pic99.

Defined this way, the numbers are stored as the ASCII representation of each digit, which should not conflict with any character mapping.

Once the map file is created, you place it on the client, or if the client is AcuServer-enabled, you can place it on the client or server. Either way, you specify the location of the map file using the DEFAULT_MAP_FILE or server_MAP_FILE variable in the client configuration file (for example, client.cfg). See Other Variables for more information on using these variables.