Skip to main content

Hi , Here's a question about how to create project for [EXEC SQL INCLUDE] Copy Books.

I'm using Visual Cobol for Eclipse on Redhat .

I know I can create a [copy book library] or [COBOL Project] for saving Copy Books only, and Other Projects that only contains

COBOL Program can use these Copy Books by setting [Micro Focus -> Build Path -> Copy Books].

But I also have some Copy Books for [EXEC SQL INCLUDE] , and seems I cannot use them by this way.

How to create a project for these [EXEC SQL INCLUDE Copy Books] ? Like the following Projects

1.  Project1   ---- only contains [Main COBOL Program]

2.  Project2   ---- only contains [Sub COBOL Program]

3.  Project3   ---- only contains Copybooks(both for normal Call statement and EXEC SQL INCLUDE) ?

the EXEC SQL is for Pro*COBOL Preprocessor for Oracle.

Thank you.

Hi , Here's a question about how to create project for [EXEC SQL INCLUDE] Copy Books.

I'm using Visual Cobol for Eclipse on Redhat .

I know I can create a [copy book library] or [COBOL Project] for saving Copy Books only, and Other Projects that only contains

COBOL Program can use these Copy Books by setting [Micro Focus -> Build Path -> Copy Books].

But I also have some Copy Books for [EXEC SQL INCLUDE] , and seems I cannot use them by this way.

How to create a project for these [EXEC SQL INCLUDE Copy Books] ? Like the following Projects

1.  Project1   ---- only contains [Main COBOL Program]

2.  Project2   ---- only contains [Sub COBOL Program]

3.  Project3   ---- only contains Copybooks(both for normal Call statement and EXEC SQL INCLUDE) ?

the EXEC SQL is for Pro*COBOL Preprocessor for Oracle.

Thank you.

Hi Zhang Xin,

To have external-to-the-project copy files - which are mentioned in EXEC SQL INCLUDE statements - available for the Pro*COBOL precompiler, you can add the CP Pre-processor to the Project's compile settings (in addition to the COBSQL Preprocessor.) You add the CP Preprocessor under Micro Focus-Project Settings-COBOL-Additional Preprocessors. If you've already set up COBSQL, you'll see it listed, but grayed out. Click on Installed on the right, choose "p(cp)", and click OK.

After you've added the CP processor, you need to ensure the preprocessors are ordered so that the CP preprocessor is listed second (you can use the Up/Down buttons to change the order). For example:

 

This way, the specification of the CP preprocessor is nested inside the specification of the COBSQL preprocessor, so that COBSQL will ask CP to import copy files before passing the source lines to Pro*COBOL.

Finally, you don't have to create a separate copybook project for those mentioned in EXEC SQL INCLUDE unless you prefer to do so. The cp preprocessor will work with the COPY and EXEC SQL INCLUDE files in the same copybook project.

Blair


Hi Zhang Xin,

To have external-to-the-project copy files - which are mentioned in EXEC SQL INCLUDE statements - available for the Pro*COBOL precompiler, you can add the CP Pre-processor to the Project's compile settings (in addition to the COBSQL Preprocessor.) You add the CP Preprocessor under Micro Focus-Project Settings-COBOL-Additional Preprocessors. If you've already set up COBSQL, you'll see it listed, but grayed out. Click on Installed on the right, choose "p(cp)", and click OK.

After you've added the CP processor, you need to ensure the preprocessors are ordered so that the CP preprocessor is listed second (you can use the Up/Down buttons to change the order). For example:

 

This way, the specification of the CP preprocessor is nested inside the specification of the COBSQL preprocessor, so that COBSQL will ask CP to import copy files before passing the source lines to Pro*COBOL.

Finally, you don't have to create a separate copybook project for those mentioned in EXEC SQL INCLUDE unless you prefer to do so. The cp preprocessor will work with the COPY and EXEC SQL INCLUDE files in the same copybook project.

Blair

Hi Blair

Thanks for the response

But I cannot add [CP Preprocessor] for my Visual Cobol IDE.

and even the [Install] button is grayed out.

Thanks


Hi Blair

Thanks for the response

But I cannot add [CP Preprocessor] for my Visual Cobol IDE.

and even the [Install] button is grayed out.

Thanks

Hi Zhang Xin,

 

I'm sorry to hear that the install button was not available for you. I'd like to check further into that problem. I'd like to see the detailed version of Visual COBOL for Eclipse you are using. Please provide the contents of the <product installation>/etc/cobver file. Also, please let me know the Operating System, O/S Version and Platform in use.

Blair


Hi Zhang Xin,

 

I'm sorry to hear that the install button was not available for you. I'd like to check further into that problem. I'd like to see the detailed version of Visual COBOL for Eclipse you are using. Please provide the contents of the <product installation>/etc/cobver file. Also, please let me know the Operating System, O/S Version and Platform in use.

Blair

Thanks for the response.

It's on Redhat Linux 8.5 , and here's the contents of my cobver

cobol v7.0.0
PRN=KXCRH/AAD:Ao.U4.13.04
PTI=32/64 bit
PTI=Micro Focus Visual COBOL for Eclipse 7.0 - Patch Update 05
PTI=Patch Update 05
PTI=pkg_290480
PTI=MFInstaller

BTW, due to there's no [CP Preprocessor] listed on my Visual Cobol,

I tried add [ p(cp) ] to [SQL Preprocessor] - [Additional Options] directly, like this

  

and it worked......even still no [CP Prepeocessor] listed.......

Thanks