I'm running Micro Focus Enterprise Developer and can't seem to get it to recognize the directory where all my data files(.dat) are. I'm running a PowerShell script that sets up an environment variable, i.e.;
$env:dd_MYFILE = "MYFILE.dat"
In the script I also try to set COBDATA, before running the batch program,i.e.;
[Environment]::SetEnvironmentVariable("COBDATA", "c:\data", "User")
Then I run the batch program that opens this file but am getting an error 35 in the file status after the open. In the COBOL, the select looks like:
SELECT MYFILE ASSIGN TO "MYFILE"
ORGANIZATION IS INDEXED
If I change the PowerShell script to the full path, i.e.;
$env:dd_MYFILE = "c:\data\MYFILE.dat"
then the file opens successfully.
For Visual COBOL is there a different way to specify data file locations?