BookmarkSubscribeRSS Feed
Lani
Calcite | Level 5
Hello all,

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.

Lani
1 REPLY 1
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
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?

Scott Barry
SBBWorks, Inc.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1121 views
  • 0 likes
  • 2 in conversation