it is very very slow.
ODS CSV file="/ww/list.csv";
proc report data=temp;
columns customer_id;
define customer_id/display " customer_id";
run;
ODS CSV close;
any help?
Data steps still work with lots of variables, you can use formats and control the output. PROC EXPORT works, assign formats in the DATA step. Also, ODS CSV plus PROC PRINT works.
PROC REPORT is designed to make complicated reports, not appropriate for CSV files.
Why so complicated?
data _null_;
set temp;
file "/ww/list.csv";
if _n_ = 1 then put "customer_id";
put customer_id;
run;
No ODS or any output-creating procedure involved.
You can use formats in the data step; alternatively, PROC EXPORT will create DATA step code for you.
Data steps still work with lots of variables, you can use formats and control the output. PROC EXPORT works, assign formats in the DATA step. Also, ODS CSV plus PROC PRINT works.
PROC REPORT is designed to make complicated reports, not appropriate for CSV files.
@walterwang wrote:
It is a very big file. a lot of columns. I want to use format to control the output.
You need to provide a better example of your code then. How many observations in the dataset? How many variables?
What do you mean by "use format"?
A CSV file has no "format". It is just a text file.
Normal CSV file generation will use the formats attached to the variables to display the values. If you want to display some of the values with a different format than is what is normally attached to the variable then perhaps you could just write the CSV with a data step and include a FORMAT statement in the data step.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
For SAS newbies, this video is a great way to get started. James Harroun walks through the process using SAS Studio for SAS OnDemand for Academics, but the same steps apply to any analytics project.
Find more tutorials on the SAS Users YouTube channel.