Help using Base SAS procedures

Format the output file

Reply
Contributor
Posts: 22

Format the output file

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
Super Contributor
Super Contributor
Posts: 3,174

Re: Format the output file

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.
Ask a Question
Discussion stats
  • 1 reply
  • 124 views
  • 0 likes
  • 2 in conversation