<?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: &amp; and missing value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/and-missing-value/m-p/63135#M13723</link>
    <description>Puzzling but this idea works great too. I originally thought we could not use . as Name is a character variable. Thank you for the reply!</description>
    <pubDate>Wed, 19 Jan 2011 17:47:24 GMT</pubDate>
    <dc:creator>mnew</dc:creator>
    <dc:date>2011-01-19T17:47:24Z</dc:date>
    <item>
      <title>&amp; and missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/and-missing-value/m-p/63128#M13716</link>
      <description>Experts:&lt;BR /&gt;
Any tips on why this does not work? The first value for Name has an embedded blank so between Name and Amount, I used two blanks for the first 3 rows. They read in fine. The last observation does not have a value for Name. I tried to add one or two blanks before the amount (40), but still could not read in the last row correctly.&lt;BR /&gt;
Thanks!&lt;BR /&gt;
&lt;BR /&gt;
data work.test;&lt;BR /&gt;
	infile datalines missover DSD DLM='  ';&lt;BR /&gt;
	input Name$ &amp;amp; Amount;&lt;BR /&gt;
	datalines;&lt;BR /&gt;
Dan Inc  100&lt;BR /&gt;
Mary  80&lt;BR /&gt;
John  200&lt;BR /&gt;
  40&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
proc print data=work.test;&lt;BR /&gt;
run;</description>
      <pubDate>Sun, 16 Jan 2011 17:34:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/and-missing-value/m-p/63128#M13716</guid>
      <dc:creator>mnew</dc:creator>
      <dc:date>2011-01-16T17:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: &amp; and missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/and-missing-value/m-p/63129#M13717</link>
      <description>What is the meaning of the &amp;amp; in your code?</description>
      <pubDate>Sun, 16 Jan 2011 17:51:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/and-missing-value/m-p/63129#M13717</guid>
      <dc:creator>bheinsius</dc:creator>
      <dc:date>2011-01-16T17:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: &amp; and missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/and-missing-value/m-p/63130#M13718</link>
      <description>Reading the INPUT statement DOC, it clearly states "...next non-blank column...".&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#a000144370.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#a000144370.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
If there is a chance you will have a blank value, then you will need to consider using the _INFILE_ automatic variable to parse your input record with the SCAN function (or possibly using FIND, INDEX/INDEXW/INDEXC).&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Google advanced search argument, this topic / post:&lt;BR /&gt;
&lt;BR /&gt;
input list format modifier site:sas.com</description>
      <pubDate>Sun, 16 Jan 2011 18:22:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/and-missing-value/m-p/63130#M13718</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2011-01-16T18:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: &amp; and missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/and-missing-value/m-p/63131#M13719</link>
      <description>Hi.&lt;BR /&gt;
Very interesting.&lt;BR /&gt;
So used three blanks for the first 3 rows,two blanks for the last row.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
data work.test;&lt;BR /&gt;
infile datalines missover dsd  DLM=' ';&lt;BR /&gt;
input Name  &amp;amp; $ +1 Amount;&lt;BR /&gt;
datalines;&lt;BR /&gt;
Dan Inc   100&lt;BR /&gt;
Mary   80&lt;BR /&gt;
John   200&lt;BR /&gt;
  40&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
proc print data=work.test;&lt;BR /&gt;
run; &lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Mon, 17 Jan 2011 05:21:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/and-missing-value/m-p/63131#M13719</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-01-17T05:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: &amp; and missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/and-missing-value/m-p/63132#M13720</link>
      <description>&amp;gt; read in fine. The last observation does not have a&lt;BR /&gt;
&amp;gt; value for Name. I tried to add one or two blanks&lt;BR /&gt;
&amp;gt; before the amount (40), but still could not read in&lt;BR /&gt;
&amp;gt; the last row correctly.&lt;BR /&gt;
&lt;BR /&gt;
the thing to add before that 40 is a dot [pre].  40[/pre] good luck</description>
      <pubDate>Mon, 17 Jan 2011 17:27:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/and-missing-value/m-p/63132#M13720</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-01-17T17:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: &amp; and missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/and-missing-value/m-p/63133#M13721</link>
      <description>&amp;gt; What is the meaning of the &amp;amp; in your code?&lt;BR /&gt;
&lt;BR /&gt;
&amp;amp;: see this site&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a003209907.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a003209907.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
The &amp;amp; (ampersand) format modifier enables you to read character values that contains one or more embedded blanks with list input and to specify a character informat. SAS reads until it encounters two consecutive blanks, the defined length of the variable, or the end of the input line, whichever comes first.</description>
      <pubDate>Wed, 19 Jan 2011 01:02:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/and-missing-value/m-p/63133#M13721</guid>
      <dc:creator>mnew</dc:creator>
      <dc:date>2011-01-19T01:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: &amp; and missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/and-missing-value/m-p/63134#M13722</link>
      <description>Thanks! Your code worked. Creative solution :).</description>
      <pubDate>Wed, 19 Jan 2011 01:22:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/and-missing-value/m-p/63134#M13722</guid>
      <dc:creator>mnew</dc:creator>
      <dc:date>2011-01-19T01:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: &amp; and missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/and-missing-value/m-p/63135#M13723</link>
      <description>Puzzling but this idea works great too. I originally thought we could not use . as Name is a character variable. Thank you for the reply!</description>
      <pubDate>Wed, 19 Jan 2011 17:47:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/and-missing-value/m-p/63135#M13723</guid>
      <dc:creator>mnew</dc:creator>
      <dc:date>2011-01-19T17:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: &amp; and missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/and-missing-value/m-p/63136#M13724</link>
      <description>Thank you. Good suggestion. So much to learn.</description>
      <pubDate>Wed, 19 Jan 2011 17:48:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/and-missing-value/m-p/63136#M13724</guid>
      <dc:creator>mnew</dc:creator>
      <dc:date>2011-01-19T17:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: &amp; and missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/and-missing-value/m-p/63137#M13725</link>
      <description>the small print in the doc points out that the default informat for char data is $. $CHAR. would return . for ., but $. treats . as "missing" for which the stored value is blank.</description>
      <pubDate>Thu, 20 Jan 2011 14:39:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/and-missing-value/m-p/63137#M13725</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-01-20T14:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: &amp; and missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/and-missing-value/m-p/63138#M13726</link>
      <description>Thank you. The additional explanation is very helpful.</description>
      <pubDate>Thu, 20 Jan 2011 17:00:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/and-missing-value/m-p/63138#M13726</guid>
      <dc:creator>mnew</dc:creator>
      <dc:date>2011-01-20T17:00:25Z</dc:date>
    </item>
  </channel>
</rss>

