Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Emmie
New Member.
959 views

Adding attribute with C$XML with length 0

I use v10.0.0 AcuCobol


call "C$XML" using CXML-ADD-ATTRIBUTE
element-handle
attribute-name
attribute-value
attribute-value-length.

attribute-value is spaces
attribute-value-length = 0


The attribute value will have the previous attribute value. Is this a bug in AcuCobol 10.0.0? When attribute-value-length is set to 1 attribute-name = " " will occur in the xml file.

0 Likes
1 Reply
Micro Focus Expert
Micro Focus Expert

RE: Adding attribute with C$XML with length 0

initial-data.

           move "george" to attribute-name.

           move "of the jungle" to attribute-value

           move 15 to    attribute-value-length.

test-cxml.            

          call "C$XML" using CXML-ADD-ATTRIBUTE

                element-handle

                attribute-name

                attribute-value

                attribute-value-length.

reset-data.

            initialize

               attribute-name attribute-value attribute-value-length.

            perform  test-cxml.

This seems to work.

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.