<?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: Format 8.2 with a infile in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Format-8-2-with-a-infile/m-p/681685#M206217</link>
    <description>&lt;P&gt;Look at the data set HAVE. Is the variable INDIC_2009 character or numeric? Are there errors or warnings in the LOG?&lt;/P&gt;</description>
    <pubDate>Fri, 04 Sep 2020 16:27:38 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-09-04T16:27:38Z</dc:date>
    <item>
      <title>Format 8.2 with a infile</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-8-2-with-a-infile/m-p/681684#M206216</link>
      <description>&lt;P&gt;Hi, I have to add a numeric variable to an existing dataset. I then used this code :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;data WANT;&lt;BR /&gt;set HAVE; &lt;BR /&gt;put INDIC_2009 8.;&lt;BR /&gt;format INDIC_2009 comma8.2;&lt;BR /&gt;datalines;&lt;BR /&gt;38,64&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;-18,36&lt;BR /&gt;0,36&lt;BR /&gt;0,36&lt;BR /&gt;-88,96&lt;BR /&gt;0,12&lt;BR /&gt;-88,96&lt;BR /&gt;-53,66&lt;BR /&gt;0,2&lt;BR /&gt;-21,344&lt;BR /&gt;2&lt;BR /&gt;3&lt;BR /&gt;-88,96&lt;BR /&gt;-88,96&lt;BR /&gt;-18,36&lt;BR /&gt;-88,96&lt;BR /&gt;0,12&lt;BR /&gt;-53,66&lt;BR /&gt;0,12&lt;BR /&gt;0,12&lt;BR /&gt;0,36&lt;BR /&gt;0,36&lt;BR /&gt;0,36&lt;BR /&gt;-107,32&lt;BR /&gt;0,6&lt;BR /&gt;-106,72&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But it does not work. I only get "."&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any idea ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you !&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 16:24:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-8-2-with-a-infile/m-p/681684#M206216</guid>
      <dc:creator>Mathis1</dc:creator>
      <dc:date>2020-09-04T16:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Format 8.2 with a infile</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-8-2-with-a-infile/m-p/681685#M206217</link>
      <description>&lt;P&gt;Look at the data set HAVE. Is the variable INDIC_2009 character or numeric? Are there errors or warnings in the LOG?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 16:27:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-8-2-with-a-infile/m-p/681685#M206217</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-09-04T16:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Format 8.2 with a infile</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-8-2-with-a-infile/m-p/681692#M206221</link>
      <description>&lt;P&gt;I added an &lt;FONT color="#FF0000"&gt;INFILE&lt;/FONT&gt; and an &lt;FONT color="#FF0000"&gt;INPUT&lt;/FONT&gt; statement to your Data step, and it seems to be working.&amp;nbsp; See code, below, and see results, below the code.&amp;nbsp; I also changed the commas to decimal points, but I am based in the US, so a comma may be valid where you are.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WANT;
	set HAVE;
*	put INDIC_2009 8.;
	format INDIC_2009 comma8.2;
	&lt;FONT color="#FF0000"&gt;INFILE	Datalines&lt;/FONT&gt;;
	&lt;FONT color="#FF0000"&gt;INPUT	INDIC_2009&lt;/FONT&gt;;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Jim&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Results:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Infile_Input_Results_2020-09-04_09-58-37.jpg" style="width: 88px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/49025i15B48463ABEFDB19/image-size/large?v=v2&amp;amp;px=999" role="button" title="Infile_Input_Results_2020-09-04_09-58-37.jpg" alt="Infile_Input_Results_2020-09-04_09-58-37.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 17:00:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-8-2-with-a-infile/m-p/681692#M206221</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2020-09-04T17:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: Format 8.2 with a infile</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-8-2-with-a-infile/m-p/681721#M206242</link>
      <description>I think you actually want the Commax informat? Because those comma's look like decimals to me...&lt;BR /&gt;&lt;A href="https://documentation.sas.com/?docsetId=leforinforref&amp;amp;docsetTarget=n0aggga4tdr094n14ecw1smkhva7.htm&amp;amp;docsetVersion=1.0&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=leforinforref&amp;amp;docsetTarget=n0aggga4tdr094n14ecw1smkhva7.htm&amp;amp;docsetVersion=1.0&amp;amp;locale=en&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Change INFILE to INPUT as indicated by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt; and you should be good from there.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Sep 2020 18:14:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-8-2-with-a-infile/m-p/681721#M206242</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-09-04T18:14:06Z</dc:date>
    </item>
  </channel>
</rss>

