Error in COPY "lixmldef.cpy".

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?

  • Verified Answer

    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.

  • 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

  • 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.