<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to import a CSV file that is transposed format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207684#M38609</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just use PROC TRANPOSE.&amp;nbsp; You might need to add some more logic to determine which variables should be numeric instead of character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; infile csv dsd truncover lrecl=2000000 length=len column=ccol;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; column+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; length _name_ $32 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; input _name_ @ ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; do observation=1 by 1 until(ccol &amp;gt; len) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; length value $200 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input value @;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc print; &lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sort;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by observation column ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc transpose data=have out=want ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by observation ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; id _name_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; var value ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc print;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Jul 2015 18:07:55 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2015-07-21T18:07:55Z</dc:date>
    <item>
      <title>How to import a CSV file that is transposed format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207683#M38608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The data structure of the file is transposed - all variable names are in the first row and the data are in the columns&lt;/P&gt;&lt;P&gt;For example this is what SASHELP.CLASS would look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 1280px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="64"&gt;Name&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;Alfred&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;Alice&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;Barbara&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;Carol&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;Henry&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;James&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;Jane&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;Janet&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;Jeffrey&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;John&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;Joyce&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;Judy&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;Louise&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;Mary&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;Philip&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;Robert&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;Ronald&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;Thomas&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;William&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Sex&lt;/TD&gt;&lt;TD class="xl63"&gt;M&lt;/TD&gt;&lt;TD class="xl63"&gt;F&lt;/TD&gt;&lt;TD class="xl63"&gt;F&lt;/TD&gt;&lt;TD class="xl63"&gt;F&lt;/TD&gt;&lt;TD class="xl63"&gt;M&lt;/TD&gt;&lt;TD class="xl63"&gt;M&lt;/TD&gt;&lt;TD class="xl63"&gt;F&lt;/TD&gt;&lt;TD class="xl63"&gt;F&lt;/TD&gt;&lt;TD class="xl63"&gt;M&lt;/TD&gt;&lt;TD class="xl63"&gt;M&lt;/TD&gt;&lt;TD class="xl63"&gt;F&lt;/TD&gt;&lt;TD class="xl63"&gt;F&lt;/TD&gt;&lt;TD class="xl63"&gt;F&lt;/TD&gt;&lt;TD class="xl63"&gt;F&lt;/TD&gt;&lt;TD class="xl63"&gt;M&lt;/TD&gt;&lt;TD class="xl63"&gt;M&lt;/TD&gt;&lt;TD class="xl63"&gt;M&lt;/TD&gt;&lt;TD class="xl63"&gt;M&lt;/TD&gt;&lt;TD class="xl63"&gt;M&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Age&lt;/TD&gt;&lt;TD align="right"&gt;14&lt;/TD&gt;&lt;TD align="right"&gt;13&lt;/TD&gt;&lt;TD align="right"&gt;13&lt;/TD&gt;&lt;TD align="right"&gt;14&lt;/TD&gt;&lt;TD align="right"&gt;14&lt;/TD&gt;&lt;TD align="right"&gt;12&lt;/TD&gt;&lt;TD align="right"&gt;12&lt;/TD&gt;&lt;TD align="right"&gt;15&lt;/TD&gt;&lt;TD align="right"&gt;13&lt;/TD&gt;&lt;TD align="right"&gt;12&lt;/TD&gt;&lt;TD align="right"&gt;11&lt;/TD&gt;&lt;TD align="right"&gt;14&lt;/TD&gt;&lt;TD align="right"&gt;12&lt;/TD&gt;&lt;TD align="right"&gt;15&lt;/TD&gt;&lt;TD align="right"&gt;16&lt;/TD&gt;&lt;TD align="right"&gt;12&lt;/TD&gt;&lt;TD align="right"&gt;15&lt;/TD&gt;&lt;TD align="right"&gt;11&lt;/TD&gt;&lt;TD align="right"&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Height&lt;/TD&gt;&lt;TD align="right"&gt;69&lt;/TD&gt;&lt;TD align="right"&gt;56.5&lt;/TD&gt;&lt;TD align="right"&gt;65.3&lt;/TD&gt;&lt;TD align="right"&gt;62.8&lt;/TD&gt;&lt;TD align="right"&gt;63.5&lt;/TD&gt;&lt;TD align="right"&gt;57.3&lt;/TD&gt;&lt;TD align="right"&gt;59.8&lt;/TD&gt;&lt;TD align="right"&gt;62.5&lt;/TD&gt;&lt;TD align="right"&gt;62.5&lt;/TD&gt;&lt;TD align="right"&gt;59&lt;/TD&gt;&lt;TD align="right"&gt;51.3&lt;/TD&gt;&lt;TD align="right"&gt;64.3&lt;/TD&gt;&lt;TD align="right"&gt;56.3&lt;/TD&gt;&lt;TD align="right"&gt;66.5&lt;/TD&gt;&lt;TD align="right"&gt;72&lt;/TD&gt;&lt;TD align="right"&gt;64.8&lt;/TD&gt;&lt;TD align="right"&gt;67&lt;/TD&gt;&lt;TD align="right"&gt;57.5&lt;/TD&gt;&lt;TD align="right"&gt;66.5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Weight&lt;/TD&gt;&lt;TD align="right"&gt;112.5&lt;/TD&gt;&lt;TD align="right"&gt;84&lt;/TD&gt;&lt;TD align="right"&gt;98&lt;/TD&gt;&lt;TD align="right"&gt;102.5&lt;/TD&gt;&lt;TD align="right"&gt;102.5&lt;/TD&gt;&lt;TD align="right"&gt;83&lt;/TD&gt;&lt;TD align="right"&gt;84.5&lt;/TD&gt;&lt;TD align="right"&gt;112.5&lt;/TD&gt;&lt;TD align="right"&gt;84&lt;/TD&gt;&lt;TD align="right"&gt;99.5&lt;/TD&gt;&lt;TD align="right"&gt;50.5&lt;/TD&gt;&lt;TD align="right"&gt;90&lt;/TD&gt;&lt;TD align="right"&gt;77&lt;/TD&gt;&lt;TD align="right"&gt;112&lt;/TD&gt;&lt;TD align="right"&gt;150&lt;/TD&gt;&lt;TD align="right"&gt;128&lt;/TD&gt;&lt;TD align="right"&gt;133&lt;/TD&gt;&lt;TD align="right"&gt;85&lt;/TD&gt;&lt;TD align="right"&gt;112&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The observations are comma delimited and we can assume that there is the same number of columns for every record. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it was a smaller file I would read it all in as character and transpose but there are over 500 columns in this file. &lt;/P&gt;&lt;P&gt;Fields with embedded comma's are quoted and it looks like the length of some lines is well over 200K.&lt;/P&gt;&lt;P&gt;And because I know someone will mention it, no, I can't request the data in a different format at this time &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 17:45:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207683#M38608</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-07-21T17:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to import a CSV file that is transposed format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207684#M38609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just use PROC TRANPOSE.&amp;nbsp; You might need to add some more logic to determine which variables should be numeric instead of character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; infile csv dsd truncover lrecl=2000000 length=len column=ccol;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; column+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; length _name_ $32 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; input _name_ @ ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; do observation=1 by 1 until(ccol &amp;gt; len) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; length value $200 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input value @;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc print; &lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sort;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by observation column ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc transpose data=have out=want ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by observation ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; id _name_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; var value ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc print;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 18:07:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207684#M38609</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-07-21T18:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to import a CSV file that is transposed format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207685#M38610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If this were a one-time thing I would be tempted to try the Excel copy and paste transpose, save as CSV and import that result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 19:36:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207685#M38610</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-07-21T19:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to import a CSV file that is transposed format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207686#M38611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's not...and unfortunately they can add/change variables as well.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 20:18:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207686#M38611</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-07-21T20:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to import a CSV file that is transposed format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207687#M38612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe &lt;A __default_attr="149594" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; %transpose macro could make your live easier. I found only this paper &lt;A href="http://support.sas.com/resources/papers/proceedings13/538-2013.pdf" title="http://support.sas.com/resources/papers/proceedings13/538-2013.pdf"&gt;http://support.sas.com/resources/papers/proceedings13/538-2013.pdf&lt;/A&gt; but I believe there is a newer and improved version available "somewhere" (Art will know).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 21:30:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207687#M38612</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-07-21T21:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to import a CSV file that is transposed format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207688#M38613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@patrick I'll give that a try but I currently don't see how that helps over a proc transpose...but I'm having issues with this one for sure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Latest version of code is on SasCommunity&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sascommunity.org/wiki/A_Better_Way_to_Flip_(Transpose)_a_SAS_Dataset" title="http://www.sascommunity.org/wiki/A_Better_Way_to_Flip_(Transpose)_a_SAS_Dataset"&gt;A Better Way to Flip (Transpose) a SAS Dataset - sasCommunity&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 21:41:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207688#M38613</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-07-21T21:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to import a CSV file that is transposed format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207689#M38614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="255172" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I believe it deals better with maintaining character/numeric variables when transposing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 21:49:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207689#M38614</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-07-21T21:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to import a CSV file that is transposed format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207690#M38615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="255172" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;: First, thank you for finding the link to the paper that &lt;A __default_attr="12296" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; suggested (BTW: all of my papers can be found at: &lt;A href="http://www.sascommunity.org/wiki/Presentations:Art297_Papers_and_Presentations" title="http://www.sascommunity.org/wiki/Presentations:Art297_Papers_and_Presentations"&gt;Presentations:Art297 Papers and Presentations - sasCommunity&lt;/A&gt;. I'll likely lose some of my friends at SAS for what I'm going to suggest, but here is how I think the problem could be solved most easily: TAKE ADVANTAGE OF EXCEL'S TRANSPOSE FEATURE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I solved the problem by bring up the file in excel, highlighting and copying all of the rows, moving my cursor down to the first cell under the original file and then clicking that cell. Then, from the home menu, I clicked on PASTE and chose the last icon in the first (paste) section (transpose).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I deleted all of the original rows and saved the file as a csv file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I ran the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc import datafile="c:\art\SASHELP_CLASS2_Transposed.csv" out=want replace dbms=csv;&lt;/P&gt;&lt;P&gt;&amp;nbsp; getnames=yes;&lt;/P&gt;&lt;P&gt;&amp;nbsp; datarow=2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; guessingrows=32767;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 22:32:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207690#M38615</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2015-07-21T22:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to import a CSV file that is transposed format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207691#M38616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="12296" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; I would have to read all as character initially, so that wouldn't help &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.sas.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="149594" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; That's what we're doing right now, the full process is in Excel. It's hard to say SAS is better if I have to keep using Excel for parts. :smileyblush:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 23:36:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207691#M38616</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-07-21T23:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to import a CSV file that is transposed format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207692#M38617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="255172" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://communities.sas.com/"&gt;&lt;/A&gt;: Okay, my SAS friends might like me again &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How about:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc import datafile="c:\art\SASHELP_CLASS_Transposed.csv" out=have replace dbms=csv;&lt;/P&gt;&lt;P&gt;&amp;nbsp; getnames=yes;&lt;/P&gt;&lt;P&gt;&amp;nbsp; datarow=2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; guessingrows=32767;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc transpose data=have out=need (drop=_label_);&lt;/P&gt;&lt;P&gt;&amp;nbsp; var _all_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc export data=need file='c:\art\SASHELP_CLASS2_Transposed.csv' replace dbms=csv;&lt;/P&gt;&lt;P&gt;&amp;nbsp; putnames=no;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc import datafile="c:\art\SASHELP_CLASS2_Transposed.csv" out=want replace dbms=csv;&lt;/P&gt;&lt;P&gt;&amp;nbsp; getnames=yes;&lt;/P&gt;&lt;P&gt;&amp;nbsp; datarow=2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; guessingrows=32767;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 23:59:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207692#M38617</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2015-07-21T23:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to import a CSV file that is transposed format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207693#M38618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brilliant! I think that will work and I'll give it a try tomorrow &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 00:12:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207693#M38618</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-07-22T00:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to import a CSV file that is transposed format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207694#M38619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are willing to let PROC IMPORT guess at the variable types you can "transpose" the data without using PROC TRANSPOSE or EXCEL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;filename&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; IN &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'c:\downloads\in.csv'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;filename&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; OUT &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'c:\downloads\out.csv'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; have ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;infile&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; IN &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;dsd&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;truncover&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;lrecl&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;2000000&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;length&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=len &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;column&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=ccol;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;length&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; row column &lt;/SPAN&gt;&lt;SPAN style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;8&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; value $&lt;/SPAN&gt;&lt;SPAN style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;200&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp; row+&lt;/SPAN&gt;&lt;SPAN style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; column=&lt;/SPAN&gt;&lt;SPAN style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;by&lt;/SPAN&gt; &lt;SPAN style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;until&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;(ccol &amp;gt; len) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; value @;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;sort&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; column row ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;_null_&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; have ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; column ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;file&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; OUT dsd &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;lrecl&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;2000000&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;put&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; value @;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; last.column &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;put&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;import&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;datafile&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=OUT &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;out&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=want &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;dbms&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=dlm replace;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;delimiter&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;','&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;print&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 01:01:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-a-CSV-file-that-is-transposed-format/m-p/207694#M38619</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-07-22T01:01:28Z</dc:date>
    </item>
  </channel>
</rss>

