The only way to test out a DFDL schema used to be by loading it to z/TPF and then performing a parse or serialize operation. With PJ46801, validation of a DFDL schema file can now be accomplished on linux on IBM Z. Validation of a DFDL schema file involves 2 components: static and dynamic. PJ46509 created the static validation of a DFDL schema for z/TPF which can be performed from linux on IBM Z using the tpfdatamap command. PJ46801 provides the dynamic validation through the ability to perform a parse and serialize of the DFDL schema on linux on IBM Z by using the tpfdatamap parse and serialize commands. If pointers are defined with the DFDL schema file, then the pointers will be converted to/from offsets for the purpose of writing/reading the specified data file. The same code currently used on z/TPF is built into the tpfdfdl shared object used by the tpfdatamap command.
The tpfdfdl shared object is also linkable for other programs on linux on IBM Z to be able to use any of the documented z/TPF DFDL functions except for the following which rely on the use of tpf_doc functions being available: tpf_dfdl_parseData and tpf_dfdl_serializeData. Since tpf_dfdl_serializeDoc only works with ordered JSON, a new option of TPF_DFDL_UNORDERED is available to specify handling of unordered JSON.
Because common deployment is used on z/TPF to create and locate DFDL metadata, an alternative mechanism is used to initiate the creation and satisfy subsequent requests for the DFDL metadata for linux on IBM Z. Multiple directories can be specified to locate DFDL schemas that may be referenced through include and import statements through a new DFDL environment variable TPF_DFDL_PATH
. Since virtually all DFDL schema files used on z/TPF import tpfbase.lib.dfdl.xsd, the TPF_DFDL_PATH needs to contain the directory for this file at a minimum. When using the tpfdatamap command, the TPF_DFDL_PATH is updated to contain the location of the designated DFDL schema filename. Additionally, if the maketpf environment can be established, the TPF_DFDL_PATH is updated to include the various TPF_ROOT directories with base/tpf-fdes
appended to be able to locate DFDL schema files shipped by z/TPF such as tpfbase.lib.dfdl.xsd.
For more information about PJ46801, see the APEDIT