<?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 how to  remove comma in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-remove-comma/m-p/352577#M273804</link>
    <description>&lt;P&gt;My code is below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data new;&lt;BR /&gt;infile "F:\Raw.txt";&lt;BR /&gt;input Id Name $ +7 Incentive : percent. Salary $ 6-12;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have attached my raw file. I want to know how should i remove comma from salary. I have considered incentive after name and want to mention salary after incentive. Although in the raw data the sequence is different.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 23 Apr 2017 07:09:02 GMT</pubDate>
    <dc:creator>manish_1</dc:creator>
    <dc:date>2017-04-23T07:09:02Z</dc:date>
    <item>
      <title>how to remove comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-remove-comma/m-p/352578#M273803</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;My code is below :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data new;&lt;BR /&gt;infile "F:\Raw.txt";&lt;BR /&gt;input Id Name $ +7 Incentive : percent. Salary $&amp;nbsp;6-12;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how should i remove comma in salary. Can we use commaW. in the above code if yes then how ?. Kindly help. I am attaching the raw data file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Apr 2017 07:14:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-remove-comma/m-p/352578#M273803</guid>
      <dc:creator>manish_1</dc:creator>
      <dc:date>2017-04-23T07:14:08Z</dc:date>
    </item>
    <item>
      <title>how to  remove comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-remove-comma/m-p/352577#M273804</link>
      <description>&lt;P&gt;My code is below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data new;&lt;BR /&gt;infile "F:\Raw.txt";&lt;BR /&gt;input Id Name $ +7 Incentive : percent. Salary $ 6-12;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have attached my raw file. I want to know how should i remove comma from salary. I have considered incentive after name and want to mention salary after incentive. Although in the raw data the sequence is different.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Apr 2017 07:09:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-remove-comma/m-p/352577#M273804</guid>
      <dc:creator>manish_1</dc:creator>
      <dc:date>2017-04-23T07:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to  remove comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-remove-comma/m-p/352579#M273805</link>
      <description>&lt;P&gt;You cannot use column input to read nonstandard data such numbers that has comma. You would need a formatted input like:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;input&amp;nbsp;@(column position) Salary comma6.;&lt;/STRONG&gt; /*Column position is the column pointer to which the input pointer should be instructed to move in the input buffer and start reading values from that point.*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Naveen Srinivasan&lt;/P&gt;</description>
      <pubDate>Sun, 23 Apr 2017 07:17:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-remove-comma/m-p/352579#M273805</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2017-04-23T07:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to  remove comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-remove-comma/m-p/352580#M273806</link>
      <description>&lt;P&gt;Hi Naveen,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the raw data below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 Ram 25,000 40% &amp;nbsp;&lt;BR /&gt;2 XYZ&amp;nbsp;31,000 25%&amp;nbsp;&lt;BR /&gt;3 ABC 42,000 46%&amp;nbsp;&lt;BR /&gt;4 MMN 52,000 20%&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to get table like below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First column: ID&lt;/P&gt;&lt;P&gt;Second Column: Name&lt;/P&gt;&lt;P&gt;Third Column: &lt;STRONG&gt;Incentive&lt;/STRONG&gt; although it is the fourth column in Raw data&lt;/P&gt;&lt;P&gt;Fourth Column: Salary, although it is the third column in Raw data that also without comma.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to do it ?&lt;/P&gt;</description>
      <pubDate>Sun, 23 Apr 2017 07:30:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-remove-comma/m-p/352580#M273806</guid>
      <dc:creator>manish_1</dc:creator>
      <dc:date>2017-04-23T07:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to remove comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-remove-comma/m-p/352582#M273807</link>
      <description>&lt;P&gt;Please try the comma.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data new;
infile cards missover;
input Id Name $3. Incentive :comma6. ;
cards;
1 Ram 25,000 
2 xyz 31,000 
3 Abc 42,000 
4 MMN 52,000 
;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 23 Apr 2017 07:41:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-remove-comma/m-p/352582#M273807</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2017-04-23T07:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to remove comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-remove-comma/m-p/352583#M273808</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data new;
infile cards missover;
input Id @3 Name $3.  @14 Incentive  :percent3.   @7 salary   :comma6. ;
cards;
1 Ram 25,000 40%
2 XYZ&amp;nbsp;31,000 25%
3 ABC 42,000 46%
4 MMN 52,000 20%&lt;BR /&gt;&lt;BR /&gt;;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 23 Apr 2017 08:00:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-remove-comma/m-p/352583#M273808</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2017-04-23T08:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to  remove comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-remove-comma/m-p/352584#M273809</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/140475"&gt;@manish_1&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi Naveen,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the raw data below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1 Ram 25,000 40% &amp;nbsp;&lt;BR /&gt;2 XYZ&amp;nbsp;31,000 25%&amp;nbsp;&lt;BR /&gt;3 ABC 42,000 46%&amp;nbsp;&lt;BR /&gt;4 MMN 52,000 20%&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to get table like below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First column: ID&lt;/P&gt;
&lt;P&gt;Second Column: Name&lt;/P&gt;
&lt;P&gt;Third Column: &lt;STRONG&gt;Incentive&lt;/STRONG&gt; although it is the fourth column in Raw data&lt;/P&gt;
&lt;P&gt;Fourth Column: Salary, although it is the third column in Raw data that also without comma.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to do it ?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Before the input statement, add a format or length statement with the variables in the desired order (the format statement does not need to contain formats).&lt;/P&gt;</description>
      <pubDate>Sun, 23 Apr 2017 08:08:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-remove-comma/m-p/352584#M273809</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-04-23T08:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to remove comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-remove-comma/m-p/352585#M273810</link>
      <description>&lt;P&gt;&lt;FONT size="5"&gt;&lt;STRONG&gt;Thanks&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Apr 2017 09:53:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-remove-comma/m-p/352585#M273810</guid>
      <dc:creator>manish_1</dc:creator>
      <dc:date>2017-04-23T09:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to  remove comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-remove-comma/m-p/352592#M273811</link>
      <description>&lt;P&gt;This is good example of why you should always define your table structure and variables instead of letting SAS guess at what definition you intended based when you first reference the variable. Use the LENGTH or ATTRIB statement to define the variables. You can also assign INFORMAT to make the INPUT statement easier.&lt;/P&gt;
&lt;P&gt;So in this case define the variables in the order you want and then on the INPUT statement read them in the order they appear in the raw data.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  length id 8 name $20 incentive salary 8 ;
  informat incentive percent. salary comma. ;
  input id name salary incentive;
cards;
1 Ram 25,000 40%  
2 XYZ 31,000 25% 
3 ABC 42,000 46% 
4 MMN 52,000 20% 
;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8500iB0FD7258A21DEF51/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Apr 2017 12:50:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-remove-comma/m-p/352592#M273811</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-04-23T12:50:04Z</dc:date>
    </item>
  </channel>
</rss>

