<?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: Need help putting in currency symbols using PROC FORMAT in SAS 9.4 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Need-help-putting-in-currency-symbols-using-PROC-FORMAT-in-SAS-9/m-p/668664#M200477</link>
    <description>&lt;P&gt;Please explain more what you want.&amp;nbsp; If you want display the SALARY variable using the US currency symbol of a $ then you could use the DOLLAR format. No need for PROC FORMAT.&lt;/P&gt;
&lt;P&gt;If you want to display a different symbol based on the value of COUNTRY then one format will not help since a format attached to a variable applies to every observation.&amp;nbsp; You will probably need to make a new variable that has the text.&lt;/P&gt;
&lt;P&gt;If you want to convert the COUNTRY name into a symbol then PROC FORMAT could help.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format ;
  value $currency 'USA'='$' 'UK'='£' 'netherlands'='€';
run;  &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You could then use that when making your new character variable.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set new;
  length salary_display $20 ;
  salary_display=cats(put(country,$currency.),put(salary,comma12.2));
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 12 Jul 2020 17:15:15 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2020-07-12T17:15:15Z</dc:date>
    <item>
      <title>Need help putting in currency symbols using PROC FORMAT in SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-putting-in-currency-symbols-using-PROC-FORMAT-in-SAS-9/m-p/668663#M200476</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need help putting in currency symbols in the salary column to the data set below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data new;&lt;BR /&gt;input empcode salary country $;&lt;BR /&gt;cards;&lt;BR /&gt;1001 1473.33 USA&lt;BR /&gt;1002 1560.00 UK&lt;BR /&gt;1003 1646.67 india&lt;BR /&gt;1004 1733.33 japan&lt;BR /&gt;1005 1820.00 netherlands&lt;BR /&gt;1006 1906.67 poland&lt;BR /&gt;1007 1933.33 zimbabwe;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was told that this could be done using PROC FORMAT. The values should still be numeric, they just need the correct currency symbols. Any help is greatly appreciated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jul 2020 17:01:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-putting-in-currency-symbols-using-PROC-FORMAT-in-SAS-9/m-p/668663#M200476</guid>
      <dc:creator>rishabhns</dc:creator>
      <dc:date>2020-07-12T17:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Need help putting in currency symbols using PROC FORMAT in SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-putting-in-currency-symbols-using-PROC-FORMAT-in-SAS-9/m-p/668664#M200477</link>
      <description>&lt;P&gt;Please explain more what you want.&amp;nbsp; If you want display the SALARY variable using the US currency symbol of a $ then you could use the DOLLAR format. No need for PROC FORMAT.&lt;/P&gt;
&lt;P&gt;If you want to display a different symbol based on the value of COUNTRY then one format will not help since a format attached to a variable applies to every observation.&amp;nbsp; You will probably need to make a new variable that has the text.&lt;/P&gt;
&lt;P&gt;If you want to convert the COUNTRY name into a symbol then PROC FORMAT could help.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format ;
  value $currency 'USA'='$' 'UK'='£' 'netherlands'='€';
run;  &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You could then use that when making your new character variable.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set new;
  length salary_display $20 ;
  salary_display=cats(put(country,$currency.),put(salary,comma12.2));
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 12 Jul 2020 17:15:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-putting-in-currency-symbols-using-PROC-FORMAT-in-SAS-9/m-p/668664#M200477</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-07-12T17:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need help putting in currency symbols using PROC FORMAT in SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-putting-in-currency-symbols-using-PROC-FORMAT-in-SAS-9/m-p/668666#M200479</link>
      <description>What do expect as result? You can only assign one format to a variable, so displaying different currency symbols depending on the of the county-variable while maintaining numeric type is hardly possible.</description>
      <pubDate>Sun, 12 Jul 2020 17:18:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-putting-in-currency-symbols-using-PROC-FORMAT-in-SAS-9/m-p/668666#M200479</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-07-12T17:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need help putting in currency symbols using PROC FORMAT in SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-putting-in-currency-symbols-using-PROC-FORMAT-in-SAS-9/m-p/668669#M200482</link>
      <description>&lt;P&gt;The end result should look like the following&lt;/P&gt;&lt;P&gt;empcode&amp;nbsp; &amp;nbsp; salary&amp;nbsp; &amp;nbsp; Country&lt;BR /&gt;1001&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$1473.33&amp;nbsp; &amp;nbsp; USA&lt;/P&gt;&lt;P&gt;1002&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;£1560.00&amp;nbsp; &amp;nbsp; UK&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1003&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;₹1646.67&amp;nbsp; &amp;nbsp; India&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the rest of the symbols for their corresponding countries and currencies&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jul 2020 18:23:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-putting-in-currency-symbols-using-PROC-FORMAT-in-SAS-9/m-p/668669#M200482</guid>
      <dc:creator>rishabhns</dc:creator>
      <dc:date>2020-07-12T18:23:36Z</dc:date>
    </item>
  </channel>
</rss>

