DATA Step, Macro, Functions and more

Create CSV file pops up window

Accepted Solution Solved
Reply
Regular Contributor
Posts: 158
Accepted Solution

Create CSV file pops up window

Hi, 

I'm experiencing two issues when I create CSV file

1- this window pops up and I don't want that to happen

2-I don't need the table to be created on the SAS system

 

 

 

Capture.111111PNG.PNG

 

 

 


Accepted Solutions
Solution
2 weeks ago
Super User
Posts: 23,752

Re: Create CSV file pops up window

1- this window pops up and I don't want that to happen

Check your preferences, under Results you can set it to do not show results as generated. This is likely why you see the popup.

 

2-I don't need the table to be created on the SAS system 

not sure what that means.

View solution in original post


All Replies
Solution
2 weeks ago
Super User
Posts: 23,752

Re: Create CSV file pops up window

1- this window pops up and I don't want that to happen

Check your preferences, under Results you can set it to do not show results as generated. This is likely why you see the popup.

 

2-I don't need the table to be created on the SAS system 

not sure what that means.

Regular Contributor
Posts: 158

Re: Create CSV file pops up window

1- this window pops up and I don't want that to happen

Check your preferences, under Results you can set it to do not show results as generated. This is likely why you see the popup.

I don't know how to do that in the windowing environment. 

 

 

2-I don't need the table to be created on the SAS system

The tables are created on the SAS system as result and I don't need that since I'm outputting the result to CSV file. 

Regular Contributor
Posts: 158

Re: Create CSV file pops up window

got it
Select Toolsthen selectOptionsthen selectPreferences
Super User
Super User
Posts: 8,115

Re: Create CSV file pops up window

How are running SAS? Are you using SAS Display Manger?  Enterprise Guide?  SAS/Studio?  Something else?

What code (if any) did you run to create the CSV file?

Regular Contributor
Posts: 158

Re: Create CSV file pops up window

 

I'm using SAS Windowing Environment. 

 

 

This is my code; 

 

ods csvall file="R:\LOCATION\Status Metrics_&date..csv";

 

ods csvall close;

 

 

Super User
Super User
Posts: 8,115

Re: Create CSV file pops up window

You can change your preferences to not automatically open ODS results.

Or you can not use ODS CSVALL to create the CSV file and instead just write it yourself with a data step. Since then SAS wouldn't consider it "results" it wouldn't pop-up that window.  That way you could continue to have SAS automatically open your real results.

 

You will probably also get better performance and a smaller file.

Here is simple example for making a CSV file without header line.

data _null_;
  file "c:\downloads\class.csv" ;
  set sashelp.class ;
  put (_all_) (+0);
run;

With a little more work you can have the data step also add the header line.

https://github.com/sasutils/macros/blob/master/csv_vnext.sas

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 80 views
  • 2 likes
  • 3 in conversation