114 access memory signal 11 error in XML parse statement

Visual Cobol 2.2 Linux .cbl file

Getting error when executing XML parse.

This program works in Vce 2.2 for Windows.

What is the reason  for error in Linux?

  • You have not provided enough information to make a determination. A 114 error is a catch-all memory error. We would most likely need a test program to reproduce the error you are experiencing.

    I would highly recommend that you open up a support incident with Customer Support so that we can attempt to troubleshoot this for you.

    Thanks
  • Thanks Chris, Below is sample code with working storage variables used

    01 xml-data.
    05 start-of-data.
    10 field1 pic x(10).
    10 field2 pic x(20).
    10 field3 pic x(15).

    01 xml-string pic x(2000).


    ----option 1 definition----
    01 xml-doc
    redefines xml-string
    pic x(2000).

    ----option 1 definition----
    01 xml-doc
    redefines xml-string
    pic x(2000).


    ----option 2 definition----
    01 xml-doc
    redefines xml-string
    pic x(2000).

    ----option 2 definition----
    01 xml-doc
    redefines xml-string
    pic x occurs 2000 TIMES depending on xml-length .

    01 xml-length comp-5 pic 9(4).

    01 NUM-CHARS PIC 9(5).

    procedure division
    X section.
    X.
    INITIALIZE xml-data
    INITIALIZE xml-string
    MOVE data to fields 1,2,3
    XML-GENERATE xml-string from start-of-data
    ON EXCEPTION
    DISPLAY 'XML generation error ' XML-CODE
    STOP RUN
    NOT ON EXCEPTION
    DISPLAY 'XML document was successfully generated.'
    END-XML

    XML PARSE
    PROCESSING PROCEDURE P
    NO EXCEPTION
    NOT ON EXCEPTION
    END-XML
    .

    P section.
    P.
    evaluate xml-event
    when ...
    end-evaluate
  • Thanks Chris, Below is sample code with working storage variables used

    01 xml-data.
    05 start-of-data.
    10 field1 pic x(10).
    10 field2 pic x(20).
    10 field3 pic x(15).

    01 xml-string pic x(2000).


    ----option 1 definition----
    01 xml-doc
    redefines xml-string
    pic x(2000).

    ----option 1 definition----
    01 xml-doc
    redefines xml-string
    pic x(2000).


    ----option 2 definition----
    01 xml-doc
    redefines xml-string
    pic x(2000).

    ----option 2 definition----
    01 xml-doc
    redefines xml-string
    pic x occurs 2000 TIMES depending on xml-length .

    01 xml-length comp-5 pic 9(4).

    01 NUM-CHARS PIC 9(5).

    procedure division
    X section.
    X.
    INITIALIZE xml-data
    INITIALIZE xml-string
    MOVE data to fields 1,2,3
    XML-GENERATE xml-string from start-of-data
    ON EXCEPTION
    DISPLAY 'XML generation error ' XML-CODE
    STOP RUN
    NOT ON EXCEPTION
    DISPLAY 'XML document was successfully generated.'
    END-XML

    XML PARSE
    PROCESSING PROCEDURE P
    NO EXCEPTION
    NOT ON EXCEPTION
    END-XML
    .

    P section.
    P.
    evaluate xml-event
    when ...
    end-evaluate
  • The source that you provided is not complete and contains errors.

    I created a test program based on what I thought your program was doing and it runs without error under both VC 2.2 Windows and Linux. We tested with RHEL Server release 5.3. The following is what we tested with: Does this fail for you?

     

           identification division.
           program-id. Program1.
    
           environment division.
           configuration section.
    
           data division.
           working-storage section.
    	   01 xml-data.
              05 start-of-data.
                 10 field1 pic x(10).
                 10 field2 pic x(20).
                 10 field3 pic x(15).
    
           01 xml-string pic x(2000).
    	   
          *----option 2 definition----
           01 xml-doc 
              redefines xml-string 
              pic x(2000).
    
          *----option 2 definition----
           01 xml-doc 
              redefines xml-string 
              pic x occurs 2000 TIMES depending on xml-length . 
    
           01 xml-length comp-5 pic 9(4).
    
           01 NUM-CHARS PIC 9(5).
    
           procedure division.
           X section.
           X-para. 
               INITIALIZE xml-data
               INITIALIZE xml-string
    		   move "test" to field1 field2 field3
               *>MOVE data to fields 1,2,3
               XML GENERATE xml-string from start-of-data
                  ON EXCEPTION
                     DISPLAY 'XML generation error ' XML-CODE
                     STOP RUN
                  NOT ON EXCEPTION
                     DISPLAY 'XML document was successfully generated.'
               END-XML
    
               XML PARSE xml-string
                 PROCESSING PROCEDURE P
                   ON EXCEPTION 
    			     display "bad"
                   NOT ON EXCEPTION
    			     display "good"
               END-XML.
         .     goback.
           P section.
           
              evaluate xml-event
                 when "1"
    				 continue
              end-evaluate.