Highlighted
Jens Forsberg Trusted Contributor.
Trusted Contributor.
197 views

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?

 

0 Likes
2 Replies
Micro Focus Expert
Micro Focus Expert

Re: Available Pro*COBOL precompiler options

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.

Thanks,

0 Likes
Jens Forsberg Trusted Contributor.
Trusted Contributor.

Re: Available Pro*COBOL precompiler options

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:

P(cobsql) COBSQLTYPE=ORACLE END-COBSQL CONFIG=[CFG] ENDP

Is that possible?

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.