Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: Setting directory path in Visual Cobol for .NET

$
0
0

Well if you only specified the filename in the select such as:

  select test-file assign to "EMPLOYEE.DAT"

Then you could set the environment variable COBDATA to point to the location of the file such as:

SET COBDATA=F:\data\proj1\master

and then it would find the file in the appropriate folder.

The problem is that this only works if you specify a filename without a drive or path specifier.

If you specify a drive or path specifier, like you are doing then the file handler assumes that this is the location in which the file exists and it will not go through the search of COBDATA.

If your application is only looking for the files in the current folder then an alternative might be to change the Working Directory parameter under Properties-->Debug to the folder in which the data files exist.

Then when you start running your program in the IDE it will automatically make the specified drive and directory the current one.

Another option is to just map your drive specifier to the approriate network share at the system level so the F: points to \data\proj1\master, etc.

Thanks.


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>