Skip to main content

Hi,

I am using a batch to compile my Cobol programs to create dll/ exe.  I have also created a cobol.dir file for some compiler directives options and kept the 'COBOL.dir' at certain location.

In the batch I am providing the statement

SET COBDIR ='Location of COBOL.dir'

but this statement does not work and I am unable to use the modified COBOL.dir. If I put the COBOL.dir in the current directory where the dll and exe are created it works fine.

I cannot put the directory file at current location and I have to use the specified location only.

can any of you please help me if I am missing anything?

Thanks

Anand

Hi,

I am using a batch to compile my Cobol programs to create dll/ exe.  I have also created a cobol.dir file for some compiler directives options and kept the 'COBOL.dir' at certain location.

In the batch I am providing the statement

SET COBDIR ='Location of COBOL.dir'

but this statement does not work and I am unable to use the modified COBOL.dir. If I put the COBOL.dir in the current directory where the dll and exe are created it works fine.

I cannot put the directory file at current location and I have to use the specified location only.

can any of you please help me if I am missing anything?

Thanks

Anand

Hello Anand:

Do not set the COBDIR environment variable to indicate the location of a cobol.dir file, because COBDIR is supposed to indicate the place where the whole Micro Focus product is installed.  If you set COBDIR to a place other than where the product is installed, it will cause undefined behavior.

A file COBOL.dir will be recognized in the current directory, as you know from experience.  COBOL.dir will also be recognized if it is placed in %COBDIR%\\etc, in other words, the \\etc sub-folder of the place where the product is installed.

To solve this problem, place your COBOL.dir file in the \\etc sub-folder of the place where the product is installed.

Here is the default product install location (though this default may potentially be overridden when a person installs the product):

C:\\Program Files (x86)\\Micro Focus\\<product-name>

for example, in the case where the Micro Focus product happens to be Enterprise Developer:

C:\\Program Files (x86)\\Micro Focus\\Enterprise Developer

So in the above example, place your COBOL.dir file in the folder:

C:\\Program Files (x86)\\Micro Focus\\Enterprise Developer\\etc

To discover the product install location, and to discover the default and proper setting for the COBDIR environment variable, use the Windows Start Menu > All Products > Micro Focus > Tools > Command Prompt to open a command prompt window, then enter:

echo %COBDIR%

For example (in the case where the Micro Focus product is Enterprise Developer):

Start > All Programs > Micro Focus Enterprise Developer > Tools > Enterprise Developer Command Prompt (32-bit)

echo %COBDIR%

Place your COBOL.dir file in %COBDIR%\\etc.

See also this link into the documentation that describes other ways of setting compiler directives as an alternative to COBOL.dir:

documentation.microfocus.com/.../GUID-D27780EB-053B-4748-8F5D-155C10149A71.html