Because XML data is neither fixed length nor fixed format, you need to use special techniques when you move XML data to COBOL data items.
For alphanumeric items, decide whether the XML data should go at the left (default) end of a COBOL item or at the right end. If it should go at the right end, specify the JUSTIFIED RIGHT clause in the declaration of the COBOL item.
Give special consideration to numeric XML values, particularly “decorated” monetary values such as '$1,234.00' or '$1234'. These two strings mean the same thing in XML, but would need completely different declarations as COBOL sending fields. Use one of these techniques when you move XML data to COBOL data items:
However, use of these functions is at the expense of performance.
related tasks
Using national data (Unicode) in COBOL
Writing procedures to process XML