I am running the following code:
proc export data=work.data
outfile='C:\test.csv'
dbms=csv replace;
delimiter=';';
run;
The column names are pretty long and so it is wrapping the first row. I do not want it to wrap.
Example of what is happening:
column1;column2;column3;column4;column5;
column6;column7
What I want:
column1;column2;column3;column4;column5;column6;column7
After the 99th character it begins to wrap.
Any help with this would be appreciated.
How do you know it is wraping, have you opened it in a text editor perhaps? Its most likely your text editor adding nice wrapping. Open it with Excel and see if the columns are all correct.
Also, don't use proc export as it just guesses what you want, and so you can end up with problems. Write a simple datastep with a file statement and put out your data, gives you more control.
How do you know it is wraping, have you opened it in a text editor perhaps? Its most likely your text editor adding nice wrapping. Open it with Excel and see if the columns are all correct.
Also, don't use proc export as it just guesses what you want, and so you can end up with problems. Write a simple datastep with a file statement and put out your data, gives you more control.
You are right. When I open it with Notepad it displays the wrapping. When I open it in excel it is on one row.
Yep, under Format action menu item there is an option for Word Wrap. If you do get this and its not just the text editor, you can always check with a hex editor (plenty of free ones out there), and what you would see is 2 codes, 0a and 0d which are tab and line feed.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.