Highlighted
Jens Forsberg Trusted Contributor.
Trusted Contributor.
240 views

PREXML and PROCOB in same project

Jump to solution

I have a project where there are embedded SQL and XML as well. When I add "$set preprocess(prexml) endp" at the top of the cbl file or add the Micro Focus XML Preprocessor in Project Properties - Preprocessors and make a rebuild, the build process seems to get hanged. The Output window keeps adding these lines until I cancel the build process:

------ Rebuild All started: Project: IntGntProject1, Configuration: Debug x86 ------

* Cobsql Integrated Preprocessor
* Compiling c:\jens\visualcobol\IntGntProject1\IntGntProject1\K2281.cbl
* CSQL-I-008: Invoking CP Preprocessor
Micro Focus Embedded XML/HTML Preprocessor
Version a.b.cc Copyright (C) Micro Focus 1984-2018. All rights reserved.
Micro Focus Embedded XML/HTML Preprocessor
Version a.b.cc Copyright (C) Micro Focus 1984-2018. All rights reserved. ...

Anyone has an idea what's wrong?

0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

Re: PREXML and PROCOB in same project

Jump to solution

I just tested this here and it seems to work fine as long as the XML preprocessor appears first in the list of the stacked preprocessors.

On the Preprocessors tab of the project properties, click on the little arrow next to the "+" sign to add a new preprocessor and select "Installed Preprocessors" and then select XML from the list. If you set the COBSQL preprocessor options on the SQL tab then it should already appear in the list. Move the XML preprocessor above the COBSQL one and it should compile ok.

 

0 Likes
2 Replies
Micro Focus Expert
Micro Focus Expert

Re: PREXML and PROCOB in same project

Jump to solution

I just tested this here and it seems to work fine as long as the XML preprocessor appears first in the list of the stacked preprocessors.

On the Preprocessors tab of the project properties, click on the little arrow next to the "+" sign to add a new preprocessor and select "Installed Preprocessors" and then select XML from the list. If you set the COBSQL preprocessor options on the SQL tab then it should already appear in the list. Move the XML preprocessor above the COBSQL one and it should compile ok.

 

0 Likes
Jens Forsberg Trusted Contributor.
Trusted Contributor.

Re: PREXML and PROCOB in same project

Jump to solution

Yes, now it works. Thank you.

And if you want to add the Pro*COBOL and CP preprocessors it seems important that they come in a certain order in Project Properties - Preprocessors. I added some simple XML-related code in a cbl file, and then added the XML Preprocessor, the Oracle Pro*COBOL preprocessor and the CP Preprocessor in that order. The preprocessor directives in the Preprocessors tab should look like this:

    P(prexml) P(cobsql) COBSQLTYPE=ORACLE END-COBSQL P(cp) ENDP

And then I made a rebuild, and it worked.

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.