ATTRIBUTE-CHARACTERS or CONTENT-CHARACTERS is split.

Technote (troubleshooting)


Problem(Abstract)

XML PARSE sometimes gives two or more XML-EVENT of ATTRIBUTE-CHARACTERS in a row.

Symptom

Given this string, notice the final letter T is delivered by itself.

<foobar effectiveln="CPPACT">something</foobar>
There are two XML-EVENTs.
ATTRIBUTE-NAME : <effectiveIn>
ATTRIBUTE-CHARACTERS : <CPPAC>
ATTRIBUTE-CHARACTERS : <T>

Cause

Compile option XMLPARSE(XMLSS)

Environment

z/OS using the SAX parser.

Diagnosing the problem

This is working as designed as and documented.

Resolving the problem

You'll need to adjust your COBOL program for this possibility. See below "Migration guide" for the documentation. Then read the part under "ATTRIBUTE-CHARACTERS event (changed)"

In particular, this line explains the behavior change:

"You might have to modify your code that handles the ATTRIBUTE-CHARACTERS event to handle more than one..."

The same information is under the part "CONTENT-CHARACTERS event (changed)."

Use the reserved word XML-INFORMATION to determine if a split has happened.

If you don't use the XML-INFORMATION word, then here is a sample program that shows how to join the cut-apart pieces.

xmlsplit.txtxmlsplit.txt


Related information

Migration guide

Rate this page:

(0 users)Average rating

Document information


More support for:

Enterprise COBOL for z/OS
Runtime

Software version:

4.1, 4.2, 5.1

Operating system(s):

z/OS

Reference #:

1396569

Modified date:

2013-07-18

Translate my page

Machine Translation

Content navigation