<?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: Dollar function not working properly in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Dollar-function-not-working-properly/m-p/76968#M16629</link>
    <description>Thank you so much!!!</description>
    <pubDate>Mon, 16 Mar 2009 14:03:13 GMT</pubDate>
    <dc:creator>KevinC_</dc:creator>
    <dc:date>2009-03-16T14:03:13Z</dc:date>
    <item>
      <title>Dollar function not working properly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dollar-function-not-working-properly/m-p/76966#M16627</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I am reading a field AMT2 ($char10) in a flat file from mainframe.  Although it's defined as $char10 in the input statement it contains numeric data only.  It also contains a decimal point.  (i.e. 10.50 )  &lt;BR /&gt;
&lt;BR /&gt;
INPUT @01     AMT2    $CHAR10&lt;BR /&gt;
&lt;BR /&gt;
I use 'dollar' in the put statement &lt;BR /&gt;
PUT @01    AMT2 DOLLAR&lt;BR /&gt;
and this is what the output looks like:  10.50 .&lt;BR /&gt;
Notice there is no '$'  and there is a '.' at the end&lt;BR /&gt;
&lt;BR /&gt;
Again, here is the input and the output&lt;BR /&gt;
input:  10.50&lt;BR /&gt;
output:  10.50 .&lt;BR /&gt;
&lt;BR /&gt;
Does anyone know how I can put a '$' at the beginning?&lt;BR /&gt;
&lt;BR /&gt;
Thank you!</description>
      <pubDate>Fri, 13 Mar 2009 21:33:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dollar-function-not-working-properly/m-p/76966#M16627</guid>
      <dc:creator>KevinC_</dc:creator>
      <dc:date>2009-03-13T21:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: Dollar function not working properly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dollar-function-not-working-properly/m-p/76967#M16628</link>
      <description>You have a SAS character variable (text string) which contains a numeric value, so you must assign a SAS numeric variable (using a FORMAT for your DOLLAR. formatted output objective), and convert the character string to numeric, using the SAS INPUT function.&lt;BR /&gt;
&lt;BR /&gt;
The SAS support website hosts SAS documentation and supplemental technical reference documents from SAS user conferences - here is a link example on this topic:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/24/590.html" target="_blank"&gt;http://support.sas.com/kb/24/590.html&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Related SAS DOC reference:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a000780416.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a000780416.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Fri, 13 Mar 2009 21:43:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dollar-function-not-working-properly/m-p/76967#M16628</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-03-13T21:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: Dollar function not working properly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dollar-function-not-working-properly/m-p/76968#M16629</link>
      <description>Thank you so much!!!</description>
      <pubDate>Mon, 16 Mar 2009 14:03:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dollar-function-not-working-properly/m-p/76968#M16629</guid>
      <dc:creator>KevinC_</dc:creator>
      <dc:date>2009-03-16T14:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Dollar function not working properly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dollar-function-not-working-properly/m-p/76969#M16630</link>
      <description>Also when you 'put' the variable you need to add a dot to the end of DOLLAR so that SAS knows it is a format. Without the dot SAS assumes it is a variable name, it creates the variable and outputs it's value (which is obviously missing as you have not assigned anything to it). So SAS puts a dot in the output, i.e. it is tearting it as a missing numeric value.</description>
      <pubDate>Mon, 16 Mar 2009 14:08:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dollar-function-not-working-properly/m-p/76969#M16630</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-03-16T14:08:35Z</dc:date>
    </item>
  </channel>
</rss>

