The ACUCOBOL-GT runtime has a file system interface for XML files, called AcuXML, that seamlessly converts XML data to COBOL data and vice versa. Information about working with XML data can be found in Working with XML Data.
When you make use of the AcuXML interface, you can use the xml2fd utility to derive an FD and SELECT statement from an XML file. When a file of type XML is selected, the import process must pass through the xml2fd utility. This utility's interface helps to guide you through the import of the XML file to an FD file, which is written into a project's .fd folder and imported into the AcuBench graphical File Designer.
xml2fd also returns a list of the lines where it's guessing about the data type. This prints to an stderr file and can be viewed in the Output window. The graphical File Designer is displayed, along with Output window information. When you click on a line in the Output window, the cursor is positioned at the line in the File Designer where the guessing occurred. You can then change the Picture clause, if desired, prior to regenerating the code.
To use xml2fd from within AcuBench, do the following:
When you invoke xml2fd from the Data view, the utility understands the context of the project and prefills the -d option entry field with the name of the directory in which the FD and SL are stored.
When xml2fd is invoked from the Tools menu, it does not have this context information, and therefore does not prefill the -d entry field.
If necessary, click the browse (“...”) button next to the Output directory (-d) field to navigate to the directory into which you want the FD and SL to be generated.
Use the -f and -s options if you prefer to generate the FD and SL into separate directories.
Note that selecting -d causes -f and -s to be disabled, because they are mutually exclusive options. Likewise, if -f or -s is selected, -d is disabled.
In the absence of any instructions (-d, -f, or -s) about where to write the output, output is written to the current working directory, typically the root of the active project.
The Output window prints the output of xml2fd. More information about this utility can be found in XML-to-FD Utility.