Created On:  07 February 2013


Customer was trying to add the TESTCOVER environment variable in the Project Properties-->Micro Focus COBOL-->Run-time Configuration-->Environment Variables in the Eclipse IDE but it was not being picked up at run-time.

Where should environment variables be set in the Eclipse IDE?  The following failed:



The customer has stumbled on to an annoying ‘feature’ in the Eclipse IDE. 

When setting the env vars in the Project Properties/MF Cobol/RT Config page as shown, a .gcf file will be created with the values in it.
This file is read by the run-time system and contains the values you have set.
This file is created when the run launch configuration is created (usually when you first run the program).

The settings are then remembered by the launch configuration. 
Changing the .gcf on disk will not reload them into the run/debug launch configuration.
There is a also feature where the .gcf file is recreated from the contents of the launch configuration in combination with the project properties. 
This means you get caught in a deadly embrace where you think you have changed the values, but they are not apparently being picked up. 
Possible Solutions:

1.       Use the environment settings within the launch configuration directly – these will be up to date and active.  (see screenshot below)

2.       Use a new launch configuration (delete the old one) and when created, it will use the contents of the .gcf file from the project properties.

3.       Within an existing launch configuration, on the General Tab change the Cobol Project to another one (via the browse... button) and you will be asked if you want to reload the Runtime Configuration from the current project.  Say No, and switch back to the project you want and then say Yes to this dialog when it appears again.  This will reload the settings into the launch configuration.

Number 1 is probably the best solution to this problem: (shown below)