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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.