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.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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
  • 1191 views
  • 0 likes
  • 2 in conversation