How do I copy and reorder selected data from a Db2® table to a sequential file?
Scenario: I have data in a Db2® table and I want to copy it to a sequential file. I only want the data for some of the columns in the Db2® table, and I want the data for those columns reordered in the sequential data set.
The FM/Db2 Export Utility (3.7) supports the export of selected columns from a Db2® object. To export selected columns only, edit the template on the Export Utility panel and deselect the columns that are not required.
The FM/Db2 Export Utility does not support the reordering of columns in the export data set. The selected columns are always exported in the order in which they are defined in the Db2® catalog. There is a simple workaround for this. Create a view for the Db2® object to be exported, specifying the columns in the desired order. Then export data from the view, to achieve the desired result.
Related tasks
Related references