Application Delivery Management
Application Modernization & Connectivity
CyberRes
IT Operations Management
An XML file was submitted to the xml2fd utility and the resulting FD stops after the 01 level.
The XML file, test.xml contains:
<company>
<name>Acucorp</name>
<address>8515 Miralani Drive</address>
<city>San Diego</city>
<state>CA</state>
<ZIP>92126</ZIP>
<remarks>COBOL tools</remarks>
</company>
using "xml2fd -p cust- test.xml" the resulting FD contains only:
* .\test.fd - Generated by xml2fd from test.xml on 2008/01/18
fd cust-company.
$XFD NAME = name
01 cust-name & nbsp; pic x(7).
The XML inside test.xml is interpreted by xml2fd as having multiple top-level, or 01 level, records (from a COBOL perspective). The xml2fd utility can only handle one 01 level record per FD so when it gets to <address> it just stops.
This can be resolved by adding another tag at the beginning and end:
<master>
<company> &nb sp;
<name>Acucorp</name>
<address>8515 Miralani Drive</address>
<city>San Diego</city>
<state>CA</state>
<ZIP>92126</ZIP>
<remarks>COBOL tools</remarks>
</company>
</master>
Then run "xml2fd -p cust- test.xml" the resulting FD is complete:
* .\test.fd - Generated by xml2fd from test.xml on 2008/01/18
fd cust-master.
$XFD NAME = company
01 cust-company.
$XFD NAME = name
03 cust-name & nbsp; pic x(9).
$XFD NAME = address
03 cust-address pic x(24).
$XFD NAME = city
03 cust-city & nbsp; pic x(11).
$XFD NAME = state
03 cust-state pic x(2).
$XFD NAME = ZIP
03 cust-ZIP &n bsp; pic 9(5).
$XFD NAME = remarks
03 cust-remarks pic x(49).