CODE_MAPPING

This configuration variable allows you to modify CALL, CHAIN, and CANCEL names at runtime. This can be particularly useful if you are using AcuServer or AcuConnect. When this variable is set to 1 (on, true, yes), every CALL, CHAIN, and CANCEL statement checks the current configuration for a name that matches the CALL name. This is handled in the same way that file name processing is done (the environment is checked for an uppercase version of the name, with any hyphens treated as underscores). If a matching name is found, its value is substituted. This is done recursively until no more matching names are found.

After this substitution occurs, the CALL name handling proceeds normally (and includes any effects of CODE_PATH, CODE_SUFFIX, and CODE_CASE).

For example, with CODE_MAPPING set to 1, if your configuration file had the following entry:

MYPROG  @sun:/app/myprog

Then CALL MYPROG would act the same as CALL @sun:/app/myprog.

Thin client applications may find the CODE_MAPPING mechanism useful for automatically adding the @[DISPLAY]: prefix to the name of the DLL to run on the display host. For example, if your configuration file includes the entry:

mylib.dll  @[DISPLAY]:mylib.dll

Then the statement

CALL  "mylib.dll" 

is interpreted as

CALL "@[DISPLAY]:mylib.dll"  

causing mylib.dll to run on the display host.

Those wanting to specify the DLL calling conventions will also find CODE_MAPPING useful. For example, if you use the following configuration entries:

funcA=funcA@__stdcall
funcB=funcB@__cdecl 

then the statement

CALL "funcA"

calls funcA using the stdcall calling convention and

CALL "funcB" 

calls funcB using the cdecl convention.

For more information about calling DLLs from thin client applications, see Thin Client Speial Topics in the AcuConnect User's Guide. For information on calling DLLs in general, see Working with Windows Technologies in A Guide to Interoperating with ACUCOBOL-GT.

The default value for this variable is 0 (off, false, no).