The put and input statement are very flexible. https://communities.sas.com/t5/SAS-Programming/Macro-to-export-sas-datset-to-CSV-with-all-columns-both-numeric/m-p ...