z/TPF - Group home

z/TPF DFDL serializer support for CSV (PJ47158)

  

Comma-separated values (CSV) is a common text file format used to store tabular data, like excel spreadsheets. Each line is a separate record where a comma separates each data column.

To serialize a CSV document, the document needs to be parsed into a format the serializer can use. Previously, this was done by creating a parser for each unique CSV document to convert CSV data into a usable format. With the z/TPF DFDL serializer support for CSV, the updated tpf_dfdl_serializeDoc function supports CSV formats to easily convert a CSV document to an application data format. The z/TPF offline utility tpfdatamap can be used to serializing CSV documents for testing. 

To serialize a CSV document, call the tpf_dfdl_serializeDoc function with DFDLFormat set to TPF_DFDL_CSV. The following options are supported only for CSV documents:

        TPF_DFDL_ROWVAL – Each element and its corresponding value appear on the same row.

        TPF_DFDL_STRICT If the document contains data not defined in the DFDL, processing stops, and an error is returned.

        TPF_DFDL_XTAGS – All element tags are excluded from the document.

For more information about APAR PJ47158, see the APEDIT.