Problem:
RETURN-CODE always 255 when program starts to execute
Initcall"mfextmap" has been used to load the External File Mapper
Resolution:
Do not use the initcall"mfextmap" compiler directive to load Mfextmap. Initcall is causing RETURN-CODE to be initialized improperly.
There are two alternatives to using the compiler directive to get the External File Mapper loaded into memory.
1) Add the following call statement:
call "mfextmap"
at the beginning of the initial program of your run unit (process). This will get the External File Mapper loaded and available to the application programs.
2) Use a "tunable", a configuration file and an environment variable to set up the External File Mapper without making changes to your application programs.
Open Net Express 4.0 Help, and click
Contents (tab),
Programming,
File Handling,
Examples,
Filenames,
External File Mapper (Mfextmap).
Example of using the External File Mapper
Suppose the user's program includes:
select myfile
assign to external mydata.
Create a text file called mfextmap.dat that contains the following line:
mydata c:\\myfiles\\mydata.dat
At run-time:
Ensure that mfextmap.dat is in the current directory, in a directory pointed to by the COBDIR environment variable or in a directory pointed to by the MFEXTMAP environment variable.
Ensure that the External File Mapper (Mfextmap) is enabled by adding the following line:
set environment_mapper=TRUE
to a configuration file pointed to by the COBCONFIG_ environment variable.
Then, when the program is run, the assigned filename mydata is mapped to the physical file C:\\myfiles\\mydata.dat.
