<?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: Mixed=yes function in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Mixed-yes-function/m-p/114976#M292901</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming your environment is SAS on Windows, here is what you do:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Run Proc Import but ignore the output&lt;/LI&gt;&lt;LI&gt;Open a new program window&lt;/LI&gt;&lt;LI&gt;Press F4 to retrieve the generated SAS code&lt;/LI&gt;&lt;LI&gt;Examine the Informat statement for the cusips&lt;/LI&gt;&lt;LI&gt;Change the Informat statement for cusips to use informat $char32.&lt;/LI&gt;&lt;LI&gt;Change the Format statement for cusips to use format $char32.&lt;/LI&gt;&lt;LI&gt;Change the Input statment to add $ after cusips&lt;/LI&gt;&lt;LI&gt;Replace proc import in your original program with &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;the amended data step code&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Rerun &lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Feb 2013 09:44:31 GMT</pubDate>
    <dc:creator>RichardinOz</dc:creator>
    <dc:date>2013-02-20T09:44:31Z</dc:date>
    <item>
      <title>Mixed=yes function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Mixed-yes-function/m-p/114975#M292900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. I encountered a problem when I imported my data from .csv to SAS. One of my columns contains cusips. Some cusips are purely numeric while others contain some letters. For example:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 64px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD align="right" height="20" width="64"&gt;&lt;P&gt;Cusips&lt;/P&gt;&lt;P&gt;3783310&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;04033V10&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I try to import the data into sas I get the message saying that some cusip values are invalid. My file is very large with many variables and rows. When I try to run guessingrows it takes a very long time to run each dataset. I tried using mixed=yes, but I always get an error message saying it is out of proper order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;PROC IMPORT OUT= WORK.INSTOWN2000Q1 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATAFILE= "F:\SAS Institutional Ownership\46_q1_2000.csv" &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBMS=CSV REPLACE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GETNAMES=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATAROW=2; &lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 22:27:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Mixed-yes-function/m-p/114975#M292900</guid>
      <dc:creator>AnaV</dc:creator>
      <dc:date>2013-02-19T22:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Mixed=yes function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Mixed-yes-function/m-p/114976#M292901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming your environment is SAS on Windows, here is what you do:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Run Proc Import but ignore the output&lt;/LI&gt;&lt;LI&gt;Open a new program window&lt;/LI&gt;&lt;LI&gt;Press F4 to retrieve the generated SAS code&lt;/LI&gt;&lt;LI&gt;Examine the Informat statement for the cusips&lt;/LI&gt;&lt;LI&gt;Change the Informat statement for cusips to use informat $char32.&lt;/LI&gt;&lt;LI&gt;Change the Format statement for cusips to use format $char32.&lt;/LI&gt;&lt;LI&gt;Change the Input statment to add $ after cusips&lt;/LI&gt;&lt;LI&gt;Replace proc import in your original program with &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;the amended data step code&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Rerun &lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2013 09:44:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Mixed-yes-function/m-p/114976#M292901</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2013-02-20T09:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Mixed=yes function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Mixed-yes-function/m-p/114977#M292902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also, note that the Mixed option is not available for csv files but can be specified for Excel libnames.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 04:00:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Mixed-yes-function/m-p/114977#M292902</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2013-02-21T04:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: Mixed=yes function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Mixed-yes-function/m-p/114978#M292903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From your file name I suspect you are doing this on some sort of quaraterly basis. I would try to make this program useable for the next quarter by working with the data source to make sure all my variable lengths are long enough to take any data sent later. There's nothing liking having to keep modifying programs to add 4 characters here and 10 there or change a character to numeric because my first data set didn't have any values for an occasionally used field as the data content changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also a good idea to examine variable names generated as some data sources may give you column headings that generate SAS variable names you don't like or are longer than you really want to use. So you can use this opportunity to make short variables and assign labels that document and make them easier to use.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 16:54:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Mixed-yes-function/m-p/114978#M292903</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-02-21T16:54:24Z</dc:date>
    </item>
  </channel>
</rss>

