How do I configure file locations with environment variables?


In order to configure file locations with environment variables you need to add the following line to your isCOBOL properties file:

iscobol.file.env_naming=1

or on the java command line with -Discobol.file.env_naming=1

and then set properties for each filename. For example, if you have the following:

SELECT MY-FILE ASSIGN TO "MYVAR"

then you can add something like the following to your isCOBOL properties file:

iscobol.myvar=C:\\Users\\jsmith\\Documents\\myapp\\data\\myfile

or

iscobol.myvar=/Users/jsmith/Documents/myapp/data/myfile

Important: The property names must be all lowercase. If using a drive identifier such as "C:" you must use double backslashes as directory delimiters.

or you could set MYVAR in the environment

set MYVAR=C:\Users\jsmith\Documents\myapp\data\myfile


Article ID: 123
Created: March 10, 2010
Last Updated: March 10, 2010
Author: Support KB Author

Online URL: https://support.veryant.com/support/phpkb/article.php?id=123