<?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: PERMANENT FIX TO REMOVE DOLLAR SIGN IN FRONT OF VALUES in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/378791#M265470</link>
    <description>&lt;P&gt;So from your description you have a numeric variable that has had the DOLLAR format permanenly attached to it. Perhaps this was done automatically when you pulled the data from an external database that had an indication that the value represented money.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can change the format attached to a variable without totally re-creating the dataset using PROC DATASETS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc datasets nolist lib=WORK;
  modify dataset;
  format amt1 amt2  comma11.2 ;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can also&amp;nbsp;just leave the DOLLAR format along and tell SAS to use a different format when you use the data.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=dataset ;
  var amt1 ;
  format amt1 best14.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Basically that is what you did when you used PROC SQL to re-create the dataset.&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jul 2017 20:28:38 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2017-07-24T20:28:38Z</dc:date>
    <item>
      <title>PERMANENT FIX TO REMOVE DOLLAR SIGN IN FRONT OF VALUES</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/184337#M265460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;CAN SOME ONE RECOMMEND ME ANY &lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG&gt;PERMANENT FIX&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt; REMOVING DOLLAR SIGN($) IN FRONT OF RECORDS(Numbers). NOT THE (INFORMAT) AS THE TABLES ARE MOVING FROM SQL TO SAS. THE VARIABLES SHOULD NOT CHANGE FROM NUMERIC TO CHARACTER.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Feb 2015 19:12:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/184337#M265460</guid>
      <dc:creator>KiranMaddi</dc:creator>
      <dc:date>2015-02-26T19:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: PERMANENT FIX TO REMOVE DOLLAR SIGN IN FRONT OF VALUES</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/184338#M265461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DON'T TYPE IN ALL CAPS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do your variables look like, are they character or numeric to start with? What format/informat and how are you moving the tables that you are having this problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Feb 2015 19:34:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/184338#M265461</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-02-26T19:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: PERMANENT FIX TO REMOVE DOLLAR SIGN IN FRONT OF VALUES</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/184339#M265462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reeza,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your prompt response. The tables were created in SQL. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex: The values for a variable called Invoice like &lt;/P&gt;&lt;P&gt;Invoice&lt;/P&gt;&lt;P&gt;$20,000&lt;/P&gt;&lt;P&gt;$3,23,000&lt;/P&gt;&lt;P&gt;I want those values with out $. Tried (Informat Invoice comma11.). Did not work and dollar was still there. Used a complicated process&lt;/P&gt;&lt;P&gt;1) compress(It converted Invoice to character)&lt;/P&gt;&lt;P&gt;2) then used Input( to convert them to numerice)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know there must be a best way to do it which I am not aware of. What can we do to permanently fix this by creating a piece of code to avoid doing all those stuff above?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry I am very new to SAS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Feb 2015 19:43:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/184339#M265462</guid>
      <dc:creator>KiranMaddi</dc:creator>
      <dc:date>2015-02-26T19:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: PERMANENT FIX TO REMOVE DOLLAR SIGN IN FRONT OF VALUES</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/184340#M265463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;INformat controls how a variable is IMported.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Format is how it is display. Apply a format, such as BEST32. instead to see the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;format var best32.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Feb 2015 19:56:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/184340#M265463</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-02-26T19:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: PERMANENT FIX TO REMOVE DOLLAR SIGN IN FRONT OF VALUES</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/184341#M265464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply.But I want the dollar to be removed and the variable should end up with numeric values. It is possible using compress and Input but I want a piece of code that does that job without writing code again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Feb 2015 20:01:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/184341#M265464</guid>
      <dc:creator>KiranMaddi</dc:creator>
      <dc:date>2015-02-26T20:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: PERMANENT FIX TO REMOVE DOLLAR SIGN IN FRONT OF VALUES</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/184342#M265465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then you either need to fix it in your SQL tables or in however you bring it into SAS, which you haven't explained.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that format will leave the variable as numeric and is more efficient than compress/input. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Feb 2015 20:04:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/184342#M265465</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-02-26T20:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: PERMANENT FIX TO REMOVE DOLLAR SIGN IN FRONT OF VALUES</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/184343#M265466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reeza.That worked on a sample code that I created. Will try on the original code tomorrow and let you know.Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Feb 2015 20:06:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/184343#M265466</guid>
      <dc:creator>KiranMaddi</dc:creator>
      <dc:date>2015-02-26T20:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: PERMANENT FIX TO REMOVE DOLLAR SIGN IN FRONT OF VALUES</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/378741#M265467</link>
      <description>&lt;P&gt;Im having trouble with this too and just found it. I understand the frustration and all caps. Ugh. Hopefully reading below will help me as well.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2017 16:45:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/378741#M265467</guid>
      <dc:creator>csnodgrass</dc:creator>
      <dc:date>2017-07-24T16:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: PERMANENT FIX TO REMOVE DOLLAR SIGN IN FRONT OF VALUES</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/378766#M265468</link>
      <description>&lt;P&gt;Post a new question/topic. Include details of what you are doing. &amp;nbsp;Are you reading from text files? Reading from SAS datasets? Data from some other file format (xlsx files perhaps)? Reading from some other external database system such as Oracle, Microsoft SQL server?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2017 18:48:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/378766#M265468</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-07-24T18:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: PERMANENT FIX TO REMOVE DOLLAR SIGN IN FRONT OF VALUES</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/378789#M265469</link>
      <description>&lt;P&gt;This is now solved.&amp;nbsp;My data &amp;nbsp;was in a SAS dataset, and the fix below worked.&lt;BR /&gt;Used proc sql for this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;proc sql;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Create table dataset as &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;id,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;amt1&amp;nbsp;format comma11.2,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;amt2&amp;nbsp;format comma11.2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;from dataset;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Result:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;2345.56 and 87.60 from original $87.60,$2345.56&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case the original source had no bearing, as it ended up as a SAS Dataset with $Dollar14.2 and Informat 14.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2017 20:12:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/378789#M265469</guid>
      <dc:creator>csnodgrass</dc:creator>
      <dc:date>2017-07-24T20:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: PERMANENT FIX TO REMOVE DOLLAR SIGN IN FRONT OF VALUES</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/378791#M265470</link>
      <description>&lt;P&gt;So from your description you have a numeric variable that has had the DOLLAR format permanenly attached to it. Perhaps this was done automatically when you pulled the data from an external database that had an indication that the value represented money.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can change the format attached to a variable without totally re-creating the dataset using PROC DATASETS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc datasets nolist lib=WORK;
  modify dataset;
  format amt1 amt2  comma11.2 ;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can also&amp;nbsp;just leave the DOLLAR format along and tell SAS to use a different format when you use the data.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=dataset ;
  var amt1 ;
  format amt1 best14.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Basically that is what you did when you used PROC SQL to re-create the dataset.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2017 20:28:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/378791#M265470</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-07-24T20:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: PERMANENT FIX TO REMOVE DOLLAR SIGN IN FRONT OF VALUES</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/378959#M265471</link>
      <description>Very good ! Thanks for the additional tip&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Jul 2017 12:53:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/378959#M265471</guid>
      <dc:creator>csnodgrass</dc:creator>
      <dc:date>2017-07-25T12:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: PERMANENT FIX TO REMOVE DOLLAR SIGN IN FRONT OF VALUES</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/378999#M265472</link>
      <description>&lt;P&gt;For the leaving of the format, if a dataset is exported to CSV, txt, excel or other format, does it export with original formatting or with the&lt;/P&gt;&lt;P&gt;"use as" formatting?&lt;BR /&gt;Thank!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 13:43:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/378999#M265472</guid>
      <dc:creator>csnodgrass</dc:creator>
      <dc:date>2017-07-25T13:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: PERMANENT FIX TO REMOVE DOLLAR SIGN IN FRONT OF VALUES</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/379004#M265473</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/127619"&gt;@csnodgrass&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;For the leaving of the format, if a dataset is exported to CSV, txt, excel or other format, does it export with original formatting or with the&lt;/P&gt;
&lt;P&gt;"use as" formatting?&lt;BR /&gt;Thank!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Depends on the method used to "export". &amp;nbsp;If you are using something like data step to write a CSV file then it should use the format when writing the value. &amp;nbsp;Similarly if you are using ODS EXCEL plus PROC PRINT to generate an EXCEL file then the formats will apply. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 13:53:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PERMANENT-FIX-TO-REMOVE-DOLLAR-SIGN-IN-FRONT-OF-VALUES/m-p/379004#M265473</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-07-25T13:53:11Z</dc:date>
    </item>
  </channel>
</rss>

