A new z/TPF DFDL offline utility (tpfdatamap) can be used to validate DFDL schema files before loading them to the z/TPF system. By validating the DFDL schema files offline, online load errors can be avoided. In addition, the z/TPF DFDL offline validation provides a way to give warnings for errors found in the DFDL schema that will not cause an online error (due to it being ignored) but should be corrected due to either non conformity with the DFDL specification or use of attributes not supported by the z/TPF DFDL parser.
By using the z/TPF DFDL offline validation, one can debug validation errors quickly because a line number is provided for each warning or error within the DFDL schema file. The utility also allows for multiple files as input so that all DFDL schema files can be validated quickly. For example you can use either a wildcard or xargs or multiple file names as shown below:
braddk@linuxtpf:~> tpfdatamap v /ztpf/curdrv/dfdl/*.dfdl.xsd
DATAMAP0012W /ztpf/curdrv/dfdl/dfdl4.drvr.dfdl.xsd:16
occursKind is not a valid DFDL attribute
DATAMAP0012W /ztpf/curdrv/dfdl/dfdlxref.drvr.dfdl.xsd:32
length is not implemented in z/TPF for the simpleType restriction
DATAMAP0001I Processing completed
braddk@linuxtpf:~> find dfdl -name *.dfdl.xsd | xargs tpfdatamap v
DATAMAP0002E dfdl/err1.dfdl.xsd:27
length error - unable to parse expression for VLF element
DATAMAP0012W dfdl/profile_request.dfdl.xsd:39
aligntmentUnits is not a valid DFDL attribute
DATAMAP0012W dfdl/DR26ED.tpfdf.dfdl.xsd:1
XSD maxOccurs is not supported by DFDL for the choice element
DATAMAP0012W dfdl/DR26ED.tpfdf.dfdl.xsd:1
XSD minOccurs is not supported by DFDL for the choice element
DATAMAP0001I Processing completed
braddk@linuxtpf:~/PJ46509> tpfdatamap v dfdlval4.drvr.dfdl.xsd packed.drvr.dfdl.xsd
DATAMAP0003E dfdlval4.drvr.dfdl.xsd
At line 46, char 30, A character other than '=' was found following attribute name
DATAMAP0002E packed.drvr.dfdl.xsd:16
import error - missing location information for prefix tpfbase
DATAMAP0012W packed.drvr.dfdl.xsd:19
Unable to resolve namespace prefix for xsd:random
DATAMAP0012W packed.drvr.dfdl.xsd:23
Unable to resolve namespace prefix for xsd:random
DATAMAP0002E packed.drvr.dfdl.xsd:25
lengthKind error - value of emplicit is unsupported
DATAMAP0012W packed.drvr.dfdl.xsd:32
message is not implemented in z/TPF for the discriminator annotation
DATAMAP0002E packed.drvr.dfdl.xsd:41
length error - length attribute must be specified when lengthKind = explicit
DATAMAP0002E packed.drvr.dfdl.xsd:41
length error - missing length specification for packed5
DATAMAP0012W packed.drvr.dfdl.xsd:41
Unable to resolve namespace prefix for dfd1:length
DATAMAP0012W packed.drvr.dfdl.xsd:50
message is not implemented in z/TPF for the discriminator annotation
DATAMAP0001I Processing completed
For more information see the IBM z/TPF documentation or the APEDIT for PJ46509.