Created On:  2010-04-19

Problem:

To generate Cobol records that contain XML syntax extensions , the customer uses the format
cbl2xml   XMLschema  .
Cbl2xml  may generate a data structure like:
04 act identified by "act" count in act-count.     
05 MyName PIC X(90) identified by "MyName" . 
..........
05 more identified by "more".                                      
  06 MyName PIC X(90) identified by "MyName".
When coding 
MOVE "Harry" to MyName of act.
The following compiler error message is returned:
COBCH0005S     User-name MyName not unique
The identifier MyName at the 05-level cannot be used in the COBOL-program, because there is no way for a proper qualification of this MyName.


 

Resolution:

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 option -unique of the cbl2xml  must be used .
cbl2xml   XMLschema   -unique

 The generated data structure is :
04 act identified by "act" count in act-count.     
05 MyName PIC X(90) identified by "MyName" . 
..........
05 more identified by "more".                                      
  06 MyName-01 PIC X(90) identified by "MyName".


 

Incident #2447908