Cobol XML Generation - Special Character Processing Error

When generating xml file from cobol, if the last character of value is a special character, then the tag is not generated properly. Please let me know if any precompiler setting is required.   We are using XML GENERATE.    Tag with error, end tag not prepared correctly :     <PREZIME>MILINOVIÄĽ/PREZIME>


Cobol version :
version @(#)cob.c       5.1.4.0
PRN=RXCTS/AAD:9r.B1.51.09
PTI=WrapPack 8
PTI=ES

  • Hello Dhaval,

    What Operating System and platform are you trying this on? Please provide the output of the command:

    uname -a

    Also, what is the last special character in the value that you have specified? From your example, I am not certain what the last character of the value should be. I have tried the following with Wrap Pack 8 (and my last character is the A with the diaeresis), and have been successful:

          IDENTIFICATION DIVISION.                                              

          PROGRAM-ID.  TEST.                                                    

          ENVIRONMENT DIVISION.                                                  

          CONFIGURATION SECTION.                                                

          DATA DIVISION.                                                        

          WORKING-STORAGE SECTION.                                              

          01 myXML pic x(1000).                                                  

          01 myItem1.                                                            

              05 myItem2 pic x(10) value "MILINOVIÄ".                            

          PROCEDURE DIVISION.                                                    

              xml generate myXML from myItem1                                    

              stop run.  

    Here is the contents of myXML after the xml generate executes:

    <MYITEM1><MYITEM2>MILINOVIÄ</MYITEM2></MYITEM1>

  • Hi Blair,

    output of the command "uname -a"  given below

    Linux RHEL6_3 2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux.

    Also content between the tags should be like  this : "BEÅ IREVIÄ"

    so the last alphabet is Ä . And tag formed is <PREZIME>BEÂCopyrightIREVIļ/PREZIME>, which is wrong.

    Please provide some suggestions its urgent.

  • Hi Dhaval,

    Problems of an urgent nature should be handled through a support incident with Customer Care and not directly on this forum.

    Have you opened up a support incident for this issue?