Available Pro*COBOL precompiler options

I have an INT/GNT project in Visual COBOL / Visual Studio. If I choose the "Oracle Pro*COBOL" preprocessor in the SQL tab in Project Properties and then click on the Add button, I notice that the options available are not the same as the options presented in the "Pro*COBOL Programmer's Guide 11g Release 2" (https://docs.oracle.com/cd/E11882_01/appdev.112/e10826/title.htm). The CONFIG and SQLCHECK options e.g. are not avaible in Visual Studio.

But if I enter these two options directly in the cblproj file they will be accepted by the compiler. And if I right-click on the project in Solution Explorer and choose "Determine directives", the SQLCHECK option will be added.

What is the logic behind this?


  • The directives in the list on the SQL tab for the Oracle Pro*COBOL selection are not Pro*COBOL directives at all. They are COBSQL directives. COBSQL is the Micro Focus utility that interfaces to the Pro*COBOL precompiler which allows you to compile your Oracle applications from within the IDE without requiring a separate precompile step. COBSQL allows you to debug your applications using the original EXEC SQL statements instead of having to navigate thru the expanded source containing CALL statements that Pro*COBOL generates.

    If you wish to add Pro*COBOL directives you can do this in the Addional Directives box on the same window or you can add them to the Pro*COBOL configuration file.

    Because Pro*COBOL is an Oracle product and not a Micro Focus one we have no control over the directives used so choose to not hard code them in a selection list.


  • OK, when using it that way, everything works. Thank you very much.

    Another question, which is a bit related to this. If I would like to send the CONFIG directive to Pro*COBOL and use a value entered in the application.config file, how would I do that? Say, for example, I have entered a key and a value in application.config like this:

    CFG          C:\VisualCobol\Oracle\Cfg\pcbcfg_my_config.cfg

    And then I would like to use the CFG key in the directives like this:


    Is that possible?