Skip to main content

Problem:

Net Express Release 4.0:

The XML-Wizard may generate a data structure like:

04 xml-act identified by "act" count in xml-act-count.      

05 xml-MyName PIC X(90) identified by "MyName" .  

..........

05 xml-more identified by "more".                                       

  06 xml-MyName PIC X(90) identified by "MyName".

When coding  

MOVE "Harry" to xml-MyName of xml-act.

The following compiler error message is returned:

COBCH0005S     User-name XML-MyName not unique

Resolution:

The identifier xml-MyName at the 05-level cannot be used in the COBOL-program, because there is no way for a proper qualification of this xml-MyName.

This is NOT a special problem of XML - any COBOL data would not be qualifyable, because there is no way to enforce a full qualification.

The 06-level xml-MyLevel can be qualified by its 05-level xml-more. But unfortunately in this case, no rule enforces the qualfication by the 05-level.

This means when accessing the 05-level of xml-MyName, it cannot be distinguish from the 06-level xml-MyName when the 06-level is given  without specifying its 05-level.

Resolutions:

1) A better one: rename the 05-level of xml-MyName.

2) Another one:

The 04-level can be used with a reference modification, like

MOVE "Harry" to  *> xml-MyName of xml-act. *> commented out

                             xml-act(1:90)

Old KB# 7152