Scot Nielson said you could do this in the webinar Getting Started with Visual Studio 2010.
On the COBOL page of my native project's properties, I am setting Additional Directives to: USE"..\\MYDIRECTIVES.DIR".
In MYDIRECTIVES.DIR I am using the COPYPATH directive to point to where the copybooks are and am leaving Copybook Paths in project properties
blank. This will make it easy for us the change directives and copybook paths for all projects. Is COPYPATH the correct way to do this ?
The documentation on this directive says:
"You should only use the COPYPATH directive when compiling using the cobol command line utility, and not when
building programs from within the IDE".
#VisualCOBOLIt has this warning about the COPYPATH directive because the IDE itself sets COPYPATH depending on the values set in the project properties.
The IDE also makes use of the COBCPY environment variable to locate certain system source files.
When you set COPYPATH yourself, the IDE will no longer look at COBCPY so it may not find some required system copybook files.
It is recommended that if you are using the Visual Studio IDE to build your projects that you either set the copy path in the project properties or for global use set the locations in the COBCPY environment variable at the system level.
Scot may have a different recommendation here but this is my understanding of the issue...
Scot Nielson said you could do this in the webinar Getting Started with Visual Studio 2010.
On the COBOL page of my native project's properties, I am setting Additional Directives to: USE"..\\MYDIRECTIVES.DIR".
In MYDIRECTIVES.DIR I am using the COPYPATH directive to point to where the copybooks are and am leaving Copybook Paths in project properties
blank. This will make it easy for us the change directives and copybook paths for all projects. Is COPYPATH the correct way to do this ?
The documentation on this directive says:
"You should only use the COPYPATH directive when compiling using the cobol command line utility, and not when
building programs from within the IDE".
#VisualCOBOLOk, so we removed the COPYPATH directive from the shared directives file. I have a further question.
Our machine has both Net Express 5.1 and Visual Studio 2010 with Visual COBOL 2.1. We are porting our NX projects to Visual COBOL. The NX and Visual COBOL versions of our application each have their own copybook directories. COBCPY on the control panel's environmental variables screen points to the
NX copybook directory. NX also has its own system copybooks under "Program Files (x86)" and Visual COBOL has its system copybooks under "Program Files (x86)". By system copybooks I mean the ones that are provided by Micro Focus.
For a Visual COBOL project, we set the Copybook Paths property on the properties screen to point
to the copybooks directory of the Visual COBOL version of our application. This directory holds the copybooks we have created and has none of the system copybooks. When we build the project, the
compiler first looks in this directory then looks in the directory defined by COBCPY. Is that correct ?
For system copybooks (such as mfole.cpy and createactivex.cpy) the compiler looks under "C:\\Program Files (x86)\\Micro Focus\\Visual COBOL\\cpylib". Is that right ?
Scot Nielson said you could do this in the webinar Getting Started with Visual Studio 2010.
On the COBOL page of my native project's properties, I am setting Additional Directives to: USE"..\\MYDIRECTIVES.DIR".
In MYDIRECTIVES.DIR I am using the COPYPATH directive to point to where the copybooks are and am leaving Copybook Paths in project properties
blank. This will make it easy for us the change directives and copybook paths for all projects. Is COPYPATH the correct way to do this ?
The documentation on this directive says:
"You should only use the COPYPATH directive when compiling using the cobol command line utility, and not when
building programs from within the IDE".
#VisualCOBOLYes, If you have a copy path specified in the project properties it will be searched first and then the locations specified within the COBCPY environment variable will be searched next.
The COBCPY environment variable has default settings that are stored in the System Registry entries for both Net Express and Visual COBOL products, so depending on which IDE you are using it will look in the correct location for that product.
For Visual COBOL the default locations are set to:
%COBCPY%;C:\\Program Files (x86)\\Micro Focus\\Visual COBOL\\cpylib\\;C:\\Program Files (x86)\\Micro Focus\\Visual COBOL\\cpylib\\basecl
Thanks.
Scot Nielson said you could do this in the webinar Getting Started with Visual Studio 2010.
On the COBOL page of my native project's properties, I am setting Additional Directives to: USE"..\\MYDIRECTIVES.DIR".
In MYDIRECTIVES.DIR I am using the COPYPATH directive to point to where the copybooks are and am leaving Copybook Paths in project properties
blank. This will make it easy for us the change directives and copybook paths for all projects. Is COPYPATH the correct way to do this ?
The documentation on this directive says:
"You should only use the COPYPATH directive when compiling using the cobol command line utility, and not when
building programs from within the IDE".
#VisualCOBOLWe have two copybook directories:
s:\\v54\\awcbl\\cpy for the NX version of our application
c:\\vcobol\\cpy for the Visual COBOL version of our application
COBCPY (on the Control Panel) is set to s:\\v54\\awcbl\\cpy
We do not want Visual COBOL to look for a copybook in this directory.
Would this work ?
We are already running Visual Studio from a shortcut to a batch file.
The batch file sets COBDIR for the Visual COBOL version of our application.
This overrides the COBDIR setting on the Control Panel, which is set for our
Net Express application.
We could also add COPCPY to this batch file to point to c:\\vcobol\\cpy. This way
Visual COBOL will never look in s:\\v54\\awcbl\\cpy.
Scot Nielson said you could do this in the webinar Getting Started with Visual Studio 2010.
On the COBOL page of my native project's properties, I am setting Additional Directives to: USE"..\\MYDIRECTIVES.DIR".
In MYDIRECTIVES.DIR I am using the COPYPATH directive to point to where the copybooks are and am leaving Copybook Paths in project properties
blank. This will make it easy for us the change directives and copybook paths for all projects. Is COPYPATH the correct way to do this ?
The documentation on this directive says:
"You should only use the COPYPATH directive when compiling using the cobol command line utility, and not when
building programs from within the IDE".
#VisualCOBOLYes, setting COBCPY in a .bat file prior to executing devenv.exe will override the value set in the control panel as long as you don't include the %COBCPY% as part of the value.
This will work:
SET COBCPY=c:\\vcobol\\cpy
devenv.exe
This will not:
SET COBCPY=%COBCPY%;c:\\vcobol\\cpy
devenv.exe