From: David E. <de...@us...> - 2006-12-31 00:05:26
|
John R. Culleton wrote: > David Essex wrote: > ... >> You can check which one TC is using the following commands. >> >> $env | grep 'TCOB_' >> TCOB_OPTIONS_PATH=/usr/local/share/htcobol >> TCOB_RTCONFIG_PATH=/usr/local/share/htcobol > > It doesn't seem to be using any of them. > Do I need a statement in my /etc/profile per the above? At compile-time TC (htcobol) will try find the compile-time resource file 'htcobolrc'. At run-time the TC RTL will load the run-time resource file 'htrtconf'. The search sequence is as follows: 1) Use the environment variables TCOB_OPTIONS_PATH and TCOB_RTCONFIG_PATH, and if the files exist load those files. 2) If the environment variables are not defined, or the resource files are not found in that path, use the a default path set at TC configure in the file 'htconfig.h'. 3) If the above two methods fail to locate and load the files, use the internal defaults set when TC is configured. This method will print a warning, as follows. $htcobol -V Cobol parameter file '/usr/local/share/htcobol/htcobolrc' not found - using configure defaults ... The advantage of using environment variables is that you can have multiple resource files. For example you can have a global (i.e. /etc/profile) and local (i.e. $HOME/.profile or .bashrc) definitions. The TC install process will not automatically add these 'TCOB_*' environment variables to the any of the profile files. How to add these environment variables. Bash example: export TCOB_OPTIONS_PATH=/usr/local/share/htcobol export TCOB_RTCONFIG_PATH=/usr/local/share/htcobol In your case, TC is most likely using a path defined when the sources were configured. The problem with this approach is that, currently, there is no way to echo this path. So it could be an old file. Actually, there is one way to find the current resource path. Temporarily move the resource directory, and then issue a 'htcobol' version command and see if it prints a warning, as above. example: $mv -i /usr/local/share/htcobol /usr/local/share/htcobol0 $htcobol -V ... But to answer your question, do you need them NO. Should I use them, YES. Hope this helps. |