Highlighted
Absent Member.
Absent Member.
2034 views

Error in COPY "lixmldef.cpy".

Jump to solution

We are compiling using Visual Cobol 2.2 with SQL embedded, and ProCobol Oracle.

Everything was working fine until we include the copy: lixmldef.cpy.

The Oracle Pre-compiler  gives us the next error:

System default option values taken from: /SOFTORACLE/product/11.2.0/client_1/pre

Error at line 4988, column 21 in file /MNG/DESA/VFUENTES/ATS/TIEN286.sks
         MicroFocus.COBOL.XmlExtensions.MicroFocusCOBOLXmlExtensions.
....................1
PCB-S-00400, Encountered the symbol "COBOL" when expecting one of the following:

   integer IDENTIFICATION ENVIRONMENT DATA PROCEDURE
   WORKING-STORAGE LINKAGE END COMMUNICATION FILE LOCAL-STORAGE
   REPORT SCREEN CONSTANT THREAD-LOCAL-STORAGE DECIMAL-POINT
   REPLACE COPY <end of statement> EXEC EXEC_SQL EXEC_SQL_BEGIN
   EXEC_SQL_END EXEC_SQL_VAR EXEC_SQL_INCLUDE EXEC_ORACLE
   EXEC_ORACLE_ENDIF EXEC_ORACLE_ELSE
The symbol "COPY" was substituted for "COBOL" to continue.

PCB-I-0556:  Unrecoverable error.  Fix previous errors and re-precompile
Error at line 4988, column 27 in file /MNG/DESA/VFUENTES/ATS/TIEN286.sks
         MicroFocus.COBOL.XmlExtensions.MicroFocusCOBOLXmlExtensions.
..........................1
PCB-S-00400, Encountered the symbol "XmlExtensions" when expecting one of the fo
llowing:

   integer IDENTIFICATION ENVIRONMENT DATA PROCEDURE
   WORKING-STORAGE LINKAGE END COMMUNICATION FILE LOCAL-STORAGE
   REPORT SCREEN CONSTANT THREAD-LOCAL-STORAGE DECIMAL-POINT
   REPLACE COPY <end of statement> EXEC EXEC_SQL EXEC_SQL_BEGIN
   EXEC_SQL_END EXEC_SQL_VAR EXEC_SQL_INCLUDE EXEC_ORACLE
   EXEC_ORACLE_ENDIF EXEC_ORACLE_ELSE

and we do not know because the pre-compiler gives us this error.

Can anyone help us?

0 Likes
2 Solutions

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Error in COPY "lixmldef.cpy".

Jump to solution

Hi Jose,

So your program is using both Pro*COBOL and XML extensions is that correct?

The statement that is causing it to fail for you is a conditional compile statement in the copybook that is meant to set a data item only if compiling for .NET managed code.

$IF ILGEN SET

      01  XMLEXT  type

        MicroFocus.COBOL.XmlExtensions.MicroFocusCOBOLXmlExtensions.

$END

XML extensions are supported in both native code and managed code programs but ProCOBOL is only supported for native.

I just tested this here and I do get the same results as you and that is because Pro*COBOL does not know what to do when encountering this structure.

You might try commenting out these offending statements or you might want do not use XML extensions directly within COBOL programs containing embedded SQL but instead place XML extensions in subprograms that can be called and compiled without procobol.

If this is still a problem for you then I would suggest that you open up a support incident with Customer Care to report this problem and perhaps we can find a different workaround for you,

Thanks.

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Error in COPY "lixmldef.cpy".

Jump to solution

Thanks Chris.

We'll proceed.

View solution in original post

0 Likes
4 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Error in COPY "lixmldef.cpy".

Jump to solution

Hi Jose,

So your program is using both Pro*COBOL and XML extensions is that correct?

The statement that is causing it to fail for you is a conditional compile statement in the copybook that is meant to set a data item only if compiling for .NET managed code.

$IF ILGEN SET

      01  XMLEXT  type

        MicroFocus.COBOL.XmlExtensions.MicroFocusCOBOLXmlExtensions.

$END

XML extensions are supported in both native code and managed code programs but ProCOBOL is only supported for native.

I just tested this here and I do get the same results as you and that is because Pro*COBOL does not know what to do when encountering this structure.

You might try commenting out these offending statements or you might want do not use XML extensions directly within COBOL programs containing embedded SQL but instead place XML extensions in subprograms that can be called and compiled without procobol.

If this is still a problem for you then I would suggest that you open up a support incident with Customer Care to report this problem and perhaps we can find a different workaround for you,

Thanks.

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Error in COPY "lixmldef.cpy".

Jump to solution

Hi Chris, I appreciate your speed in answering our problem.

Yes our programs are using both, XML and PRoCobol.

We are not compiling for .NET. Our executables program are running under UNIX.

If we comment these sentences, this could solve the problem?

Could we modify the code like this ?:

     *  $IF ILGEN SET

     *  01  XMLEXT  type

     *        MicroFocus.COBOL.XmlExtensions.MicroFocusCOBOLXmlExtensions.

     * $END

Thank in advance

Jose Maria

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Error in COPY "lixmldef.cpy".

Jump to solution

Yes, try commenting out the code as you indicate.

I am not really sure if that is the only place that you will need to do this but give it a try and see.

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Error in COPY "lixmldef.cpy".

Jump to solution

Thanks Chris.

We'll proceed.

View solution in original post

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.