Created On:  26 October 2012

Problem:

Customer has Visual COBOL application which is using COBOL data files that are being assigned as follows:

SELECT TEST-FILE ASSIGN TO "TEST.DAT"

TEST.DAT resides in a folder called C:\datafiles.

The application is running in a folder called C:\myproject\myproject\bin\x86\debug

How can he setup his application so that TEST.DAT will be found when it is opened?

Resolution:

You can include the full path to the filename in the ASSIGN clause like:

SELECT TEST-FILE ASSIGN TO "C:\datafiles\TEST.DAT"

You could also change your working folder to be:
c:\datafiles on the properties page-->Debug tab.

There are many different optons to use including assigning to environment variables or to data items or using MFEXTMAP.

Please look at the docs under the File Handler section here:
http://documentation.microfocus.com/help/index.jsp?topic=%2Fcom.microfocus.eclipse.infocenter.visualcobol.vs%2FBKFHFHNAME.html

One other thing that you can try is to set the environment variable COBDATA to point to the folder where your files are.
Right click on your project name and choose add->New Item and then select Application Configuration file.

Then right click on app.config under your project name and select Edit.
Set variable name to COBDATA and value to c:\datafiles

Now if your program is opening file TEST.DAT it will search for it in your data folder