I would like to export a CSV file from a SAS dataset in which the text and date variables are enclosed in quotes when there is a value present and not when the value is null. For example, below, Jane does not have a middle name or a birth date, and so no "" appear around the nulls "First_Name","Middle_Name","Last_Name","Birth_Date" "Jeff","Duke","Doe","1/1/2000" "Jane",,"Doe", All I can manage to get in a CSV file from SAS is: "First_Name","Middle_Name","Last_Name","Birth_Date" "Jeff","Duke","Doe","1/1/2000" "Jane","","Doe","" Using: data _null_; file 'D:file/location/Data_Want.csv' dsd dlm=','; set Data.Have ; if _n_ = 1 then '"First_Name","Middle_Name","Last_Name","Birth_Date"'; put First_Name ~ Middle_Name ~ Last_Name ~ Birth_Date ~ ; run; Is there a way to do this so that the Middle_Name and Birth_Date fields will export without quotes when null? TIA
... View more