I am trying to create the output of csv files and I want the variables in the positions I prefer (I need to keep the same format for all output files). I used "keep=" option in the DATA step but it doesn't work. Thanks for your help.
Feedback for the OP: you are posting in the SAS Procedures forum - this post is more suitable in a different forum for more general SAS DATA step processing. Suggest reviewing each forum next time before selecting one to post.
More important, post whatever SAS code you are working with, for most appropriate feedback with your issue/concern.
Clarification to statement: "I want the variables in the positions I prefer.." Are you using ODS CSV with a PROC PRINT? If so, use the VAR statement to order your variables as desired. Or if you are interested in influencing how SAS orders (internally) the variables as shown in PROC CONTENTS, it is possible to use either a LENGTH or RETAIN statement ahead of a SET or assignment to influence the variable order...but for what purpose?