I need to convert SAS data tables into flat files (or "ASCII files" as they were called once, as opposed to binary files). And only one flat file for each original SAS table. The challenging thing is that I want the flat file to contain some structural information of the original SAS table also, specifically:
- Variable/Column name
- Variable/Column label
- Variable/Column type
- Variable/Column length
- Variable/Column format
- Variable/Column informat
Additional information:
- I will only need to convert small data (< 100 obs).
- Performance is not an issue (within reasonable limits).
- The flat file should form a basis for recreating the original SAS table, I don't need to be able to use the file directly as a table in DATA or PROC steps.
The standard SAS tables, transport files, XPORT files, etc are all binary format files, and the standard XML table format in SAS and CSV-files don't preserve table structure. So obviously these options don't help.
What is my best option?