<?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: Reading raw currency data with R$ prefix in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-raw-currency-data-with-R-prefix/m-p/695009#M37403</link>
    <description>&lt;DIV&gt;&lt;FONT&gt;Thank you so much guys!&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;As &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15410"&gt;@data_null__&lt;/a&gt; said, both &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15410"&gt;@data_null__&lt;/a&gt; and &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt; answers works perfectly but I will mark &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt; answer as the solution because we don't have to use the locale option.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;Thanks again!&lt;/FONT&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 28 Oct 2020 19:55:34 GMT</pubDate>
    <dc:creator>luis_costa</dc:creator>
    <dc:date>2020-10-28T19:55:34Z</dc:date>
    <item>
      <title>Reading raw currency data with R$ prefix</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-raw-currency-data-with-R-prefix/m-p/694976#M37394</link>
      <description>&lt;DIV&gt;&lt;FONT&gt;I'm trying to read a raw data file with the R$ (brazilian's currency) prefix.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;What I can do by now is to read as character, use compress() to only keep digits, and then input() with a 10.2 informat and it works fine.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;But I want a more "elegant" way to read this file, like using a custom informat in input.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;Is it possible to do something like that?&lt;/FONT&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 28 Oct 2020 18:11:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-raw-currency-data-with-R-prefix/m-p/694976#M37394</guid>
      <dc:creator>luis_costa</dc:creator>
      <dc:date>2020-10-28T18:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: Reading raw currency data with R$ prefix</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-raw-currency-data-with-R-prefix/m-p/694991#M37395</link>
      <description>&lt;P&gt;You need the LOCALE system option and an NLS informat.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;554  data _null_;
555     x = 'R$100,50';
556     y = input(x,NLMNY10.);
557     z = input(x,NLMNY10.2);
558     put (y z)(=NLMNY10.2);
559     put _all_;
560     run;

y=R$100,50 z=R$100,50
x=R$100,50 y=100.5 z=100.5 _ERROR_=0 _N_=1
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 19:18:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-raw-currency-data-with-R-prefix/m-p/694991#M37395</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2020-10-28T19:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Reading raw currency data with R$ prefix</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-raw-currency-data-with-R-prefix/m-p/694992#M37396</link>
      <description>&lt;P&gt;My oh my!! Guru&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15410"&gt;@data_null__&lt;/a&gt;&amp;nbsp; How did you know that?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 19:19:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-raw-currency-data-with-R-prefix/m-p/694992#M37396</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-10-28T19:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Reading raw currency data with R$ prefix</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-raw-currency-data-with-R-prefix/m-p/694995#M37397</link>
      <description>&lt;P&gt;You might be able to use an NLMNLBRLw.d informat.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data example;
    x='R$123,456.78';
    y= input(x,NLMNLBRL32.);
run;&lt;/PRE&gt;
&lt;P&gt;There is a corresponding form to display the values in the same form.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 19:21:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-raw-currency-data-with-R-prefix/m-p/694995#M37397</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-10-28T19:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Reading raw currency data with R$ prefix</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-raw-currency-data-with-R-prefix/m-p/694999#M37399</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;You might be able to use an NLMNLBRLw.d informat.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data example;
    x='R$123,456.78';
    y= input(x,NLMNLBRL32.);
run;&lt;/PRE&gt;
&lt;P&gt;There is a corresponding form to display the values in the same form.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I believe that&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt; suggestion is best option because you don't have to change the LOCALE.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 19:33:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-raw-currency-data-with-R-prefix/m-p/694999#M37399</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2020-10-28T19:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: Reading raw currency data with R$ prefix</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-raw-currency-data-with-R-prefix/m-p/695001#M37400</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;You might be able to use an NLMNLBRLw.d informat.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data example;
    x='R$123,456.78';
    y= input(x,NLMNLBRL32.);
run;&lt;/PRE&gt;
&lt;P&gt;There is a corresponding form to display the values in the same form.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I believe this is the better option because you don't have to fiddle with LOCALE.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 19:34:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-raw-currency-data-with-R-prefix/m-p/695001#M37400</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2020-10-28T19:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: Reading raw currency data with R$ prefix</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-raw-currency-data-with-R-prefix/m-p/695002#M37401</link>
      <description>I didn't know I had to look it up.</description>
      <pubDate>Wed, 28 Oct 2020 19:37:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-raw-currency-data-with-R-prefix/m-p/695002#M37401</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2020-10-28T19:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: Reading raw currency data with R$ prefix</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-raw-currency-data-with-R-prefix/m-p/695005#M37402</link>
      <description>&lt;P&gt;Much thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp; and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15410"&gt;@data_null__&lt;/a&gt;&amp;nbsp; &amp;nbsp;. I learned something new. Great stuff!!!&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 19:48:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-raw-currency-data-with-R-prefix/m-p/695005#M37402</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-10-28T19:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: Reading raw currency data with R$ prefix</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-raw-currency-data-with-R-prefix/m-p/695009#M37403</link>
      <description>&lt;DIV&gt;&lt;FONT&gt;Thank you so much guys!&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;As &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15410"&gt;@data_null__&lt;/a&gt; said, both &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15410"&gt;@data_null__&lt;/a&gt; and &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt; answers works perfectly but I will mark &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt; answer as the solution because we don't have to use the locale option.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;Thanks again!&lt;/FONT&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 28 Oct 2020 19:55:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-raw-currency-data-with-R-prefix/m-p/695009#M37403</guid>
      <dc:creator>luis_costa</dc:creator>
      <dc:date>2020-10-28T19:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Reading raw currency data with R$ prefix</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-raw-currency-data-with-R-prefix/m-p/695011#M37404</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15410"&gt;@data_null__&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;You need the LOCALE system option and an NLS informat.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;554  data _null_;
555     x = 'R$100,50';
556     y = input(x,NLMNY10.);
557     z = input(x,NLMNY10.2);
558     put (y z)(=NLMNY10.2);
559     put _all_;
560     run;

y=R$100,50 z=R$100,50
x=R$100,50 y=100.5 z=100.5 _ERROR_=0 _N_=1
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This was where I started as well. But I remembered that there were some locale specific formats I had encountered (while looking for something else) and thought there might be a Brazil version. So I searched the formats documentation for Brazil an lo and behold, there is one.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 20:02:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Reading-raw-currency-data-with-R-prefix/m-p/695011#M37404</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-10-28T20:02:14Z</dc:date>
    </item>
  </channel>
</rss>

