<?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: value in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/value/m-p/791902#M32635</link>
    <description>&lt;P&gt;Do ALL of your values you need to read end in exactly 2 implied decimal? (Implied decimal is the term for when the decimal portion of a value is not shown but you know it is there.)&lt;/P&gt;
&lt;P&gt;If so then you use a format long enough to read all the characters and use the fixed decimal to indicate the value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data example;
   input x 16.2;
   y= x*3;
   format x 16.2 y dollar17.1;
datalines;
1233211321 
123456
1289 
123456789122
;&lt;/PRE&gt;
&lt;P&gt;The 16.2 on the input statement tells SAS to read upto 16 characters as numeric and treat the last two digits a decimal if there is not a decimal in the value. The FORMAT displays the value of a SAS variable according to your desire. I am not sure that you actually intended to display the currency value with one decimal as you show commas all through the value and the shown s $3,699,639&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;6 is incorrect for all the currency display systems I am familiar with.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If only SOME of your values have the implied decimal and are integers then you need to provide a rule for telling which is which as that is a non-trivial exercise.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/413783"&gt;@Hayk290489&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;please help solve the ollowing problems&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;we have "x" variable vith 1233211321 value.&lt;/P&gt;
&lt;P&gt;1.Make SAS to read this value in this way 1233213.21&lt;/P&gt;
&lt;P&gt;2.After that multiple that value by 3&lt;/P&gt;
&lt;P&gt;3.Introduce thyat value like this $3,699,639,6&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jan 2022 16:38:44 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2022-01-24T16:38:44Z</dc:date>
    <item>
      <title>value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/value/m-p/791700#M32628</link>
      <description>&lt;P&gt;please help solve the ollowing problems&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;we have "x" variable vith 1233211321 value.&lt;/P&gt;&lt;P&gt;1.Make SAS to read this value in this way 1233213.21&lt;/P&gt;&lt;P&gt;2.After that multiple that value by 3&lt;/P&gt;&lt;P&gt;3.Introduce thyat value like this $3,699,639,6&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jan 2022 09:29:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/value/m-p/791700#M32628</guid>
      <dc:creator>Hayk290489</dc:creator>
      <dc:date>2022-01-23T09:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: value</title>
      <link>https://communities.sas.com/t5/New-SAS-User/value/m-p/791902#M32635</link>
      <description>&lt;P&gt;Do ALL of your values you need to read end in exactly 2 implied decimal? (Implied decimal is the term for when the decimal portion of a value is not shown but you know it is there.)&lt;/P&gt;
&lt;P&gt;If so then you use a format long enough to read all the characters and use the fixed decimal to indicate the value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data example;
   input x 16.2;
   y= x*3;
   format x 16.2 y dollar17.1;
datalines;
1233211321 
123456
1289 
123456789122
;&lt;/PRE&gt;
&lt;P&gt;The 16.2 on the input statement tells SAS to read upto 16 characters as numeric and treat the last two digits a decimal if there is not a decimal in the value. The FORMAT displays the value of a SAS variable according to your desire. I am not sure that you actually intended to display the currency value with one decimal as you show commas all through the value and the shown s $3,699,639&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;,&lt;/FONT&gt;&lt;/STRONG&gt;6 is incorrect for all the currency display systems I am familiar with.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If only SOME of your values have the implied decimal and are integers then you need to provide a rule for telling which is which as that is a non-trivial exercise.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/413783"&gt;@Hayk290489&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;please help solve the ollowing problems&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;we have "x" variable vith 1233211321 value.&lt;/P&gt;
&lt;P&gt;1.Make SAS to read this value in this way 1233213.21&lt;/P&gt;
&lt;P&gt;2.After that multiple that value by 3&lt;/P&gt;
&lt;P&gt;3.Introduce thyat value like this $3,699,639,6&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 16:38:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/value/m-p/791902#M32635</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-01-24T16:38:44Z</dc:date>
    </item>
  </channel>
</rss>

