PROC EXPORT does not write out all the variables listed for the KEEP= data set option when the PUTNAMES=NO statement is also used. For example, two variables are listed for the KEEP= data set option, but only one variable is written to the file. Here is a syntax example that can cause this issue; in this case, only the AGE variable is written to the class.csv file:
The workaround is to use the KEEP= data set option in a DATA step prior to PROC EXPORT. Then use PROC EXPORT with the PUTNAMES=NO statement to create an external file that does not include variable names as column names in the first row. Here is the syntax to use for the workaround: