<?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: BASE  SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/BASE-SAS/m-p/364486#M86457</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input PS$ lat long slot Dist;
datalines;
abc 75.8233 26.2454 1 0.00 
abc 75.4785 26.4589 1 38939.03 
abc 75.5495 26.4679 1 31174.08 
abc 75.4875 26.8997 2 0.00 
abc 75.5649 26.7268 2 9896.03 
abc 75.5666 26.8647 2 8883.29 
xyz 75.4875 26.3842 1 0.00 
xyz 75.4937 26.5877 1 5735.38 
xyz 75.8473 26.3971 1 40164.19 
xyz 75.7861 26.6884 2 0.00
;

data have less_than_10000;
	set have;
	if dist &amp;lt; 10000 then do;
		xyz = 1;
		output less_than_10000;
	end;
	else do;
		xyz = -100;
		output have;
	end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 06 Jun 2017 07:14:31 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2017-06-06T07:14:31Z</dc:date>
    <item>
      <title>BASE  SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BASE-SAS/m-p/364472#M86447</link>
      <description>&lt;P&gt;This is my data:&lt;/P&gt;&lt;P&gt;PS &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Lat &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Long &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Slot &amp;nbsp; &amp;nbsp; &amp;nbsp; Dist&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="lia-message-body"&gt;&lt;DIV class="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t;TR&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;TD&gt;75.4937&lt;/TD&gt;&lt;TD&gt;26.5877&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;5735.38&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;TD&gt;75.8473&lt;/TD&gt;&lt;TD&gt;26.3971&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;40164.19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;TD&gt;75.7861&lt;/TD&gt;&lt;TD&gt;26.6884&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;0.00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I want to copy those values which have dist less than 10000 to a new dataset and also delete these values from the original dataset,&lt;/P&gt;&lt;P&gt;So please suggest me some solution,&lt;/P&gt;&lt;P&gt;Thnx in advance&lt;/P&gt;&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31304"&gt;@PeterClemmensen&lt;/a&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-footer"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 06 Jun 2017 06:09:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BASE-SAS/m-p/364472#M86447</guid>
      <dc:creator>Himanshu007</dc:creator>
      <dc:date>2017-06-06T06:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: BASE  SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BASE-SAS/m-p/364473#M86448</link>
      <description>&lt;P&gt;Something like this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input PS$ lat long slot Dist;
datalines;
abc 75.8233 26.2454 1 0.00 
abc 75.4785 26.4589 1 38939.03 
abc 75.5495 26.4679 1 31174.08 
abc 75.4875 26.8997 2 0.00 
abc 75.5649 26.7268 2 9896.03 
abc 75.5666 26.8647 2 8883.29 
xyz 75.4875 26.3842 1 0.00 
xyz 75.4937 26.5877 1 5735.38 
xyz 75.8473 26.3971 1 40164.19 
xyz 75.7861 26.6884 2 0.00
;

data have less_than_10000;
	set have;
	if dist &amp;lt; 10000 then output less_than_10000;
	else output have;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Jun 2017 06:12:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BASE-SAS/m-p/364473#M86448</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-06-06T06:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: BASE  SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BASE-SAS/m-p/364476#M86450</link>
      <description>Exactly, thnx a lot</description>
      <pubDate>Tue, 06 Jun 2017 06:34:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BASE-SAS/m-p/364476#M86450</guid>
      <dc:creator>Himanshu007</dc:creator>
      <dc:date>2017-06-06T06:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: BASE  SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BASE-SAS/m-p/364478#M86451</link>
      <description>I also want to add a new column named XYZ and give value 1 in the new dataset and -100 in the previous dataset,&lt;BR /&gt;Plz suggest me some solution&lt;BR /&gt;Thnx in advance</description>
      <pubDate>Tue, 06 Jun 2017 06:39:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BASE-SAS/m-p/364478#M86451</guid>
      <dc:creator>Himanshu007</dc:creator>
      <dc:date>2017-06-06T06:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: BASE  SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BASE-SAS/m-p/364480#M86453</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I also want to add a new column named XYZ and give value 1 in the new dataset and -100 in the previous dataset,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Plz suggest me some solution&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thnx in advance&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31304"&gt;@PeterClemmensen&lt;/a&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 06:46:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BASE-SAS/m-p/364480#M86453</guid>
      <dc:creator>Himanshu007</dc:creator>
      <dc:date>2017-06-06T06:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: BASE  SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BASE-SAS/m-p/364486#M86457</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input PS$ lat long slot Dist;
datalines;
abc 75.8233 26.2454 1 0.00 
abc 75.4785 26.4589 1 38939.03 
abc 75.5495 26.4679 1 31174.08 
abc 75.4875 26.8997 2 0.00 
abc 75.5649 26.7268 2 9896.03 
abc 75.5666 26.8647 2 8883.29 
xyz 75.4875 26.3842 1 0.00 
xyz 75.4937 26.5877 1 5735.38 
xyz 75.8473 26.3971 1 40164.19 
xyz 75.7861 26.6884 2 0.00
;

data have less_than_10000;
	set have;
	if dist &amp;lt; 10000 then do;
		xyz = 1;
		output less_than_10000;
	end;
	else do;
		xyz = -100;
		output have;
	end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Jun 2017 07:14:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BASE-SAS/m-p/364486#M86457</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-06-06T07:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: BASE  SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BASE-SAS/m-p/364487#M86458</link>
      <description>It works,&lt;BR /&gt;Thnx a lot</description>
      <pubDate>Tue, 06 Jun 2017 07:29:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BASE-SAS/m-p/364487#M86458</guid>
      <dc:creator>Himanshu007</dc:creator>
      <dc:date>2017-06-06T07:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: BASE  SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BASE-SAS/m-p/364527#M86465</link>
      <description>&lt;P&gt;If u could please suggest me as to how to append instead of output at this statement&lt;BR /&gt;output less_than_10000;&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31304"&gt;@PeterClemmensen&lt;/a&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 11:30:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BASE-SAS/m-p/364527#M86465</guid>
      <dc:creator>Himanshu007</dc:creator>
      <dc:date>2017-06-06T11:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: BASE  SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BASE-SAS/m-p/364528#M86466</link>
      <description>&lt;P&gt;Here is the code with the append procedure from the deleted thread &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/146929"&gt;@Himanshu007&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Dataset_1;
input PS$ lat long slot Dist xyz;
datalines;
abc 75.8233 26.2454 1 0 2 
abc 75.4875 26.8997 2 0 2 
xyz 75.4875 26.3842 1 0 2 
xyz 75.7861 26.6884 2 0 2 
;

data Dataset_2;
input PS$ lat long slot Dist xyz;
datalines;
abc 75.4785 26.4589 1 0.00 -100 
abc 75.5495 26.4679 1 7929.25 -100 
abc 75.5649 26.7268 2 0.00 -100 
abc 75.5666 26.8647 2 3843.27 -100 
xyz 75.4937 26.5877 1 0.00 -100 
xyz 75.8473 26.3971 1 39820.47 -100 
;

proc append base = Dataset_1 data = Dataset_2;
	where Dist &amp;lt; 5000;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Dont know why it is deleted &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 11:32:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BASE-SAS/m-p/364528#M86466</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-06-06T11:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: BASE  SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BASE-SAS/m-p/364563#M86472</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class="login-bold"&gt;&lt;A id="link_8" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31304" target="_self"&gt;draycut&lt;/A&gt;,&amp;nbsp;&lt;SPAN class=""&gt;&lt;A id="link_13" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/146929" target="_self"&gt;Himanshu007&lt;/A&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN class=""&gt;The other thread got caught in the spam filter. I've "released" so it's now on the community but I'm going to delete because the solution is on this thread.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN class=""&gt;Best,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN class=""&gt;Anna&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 13:11:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BASE-SAS/m-p/364563#M86472</guid>
      <dc:creator>AnnaBrown</dc:creator>
      <dc:date>2017-06-06T13:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: BASE  SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BASE-SAS/m-p/364567#M86473</link>
      <description>&lt;P&gt;Great, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/33307"&gt;@AnnaBrown&lt;/a&gt;, have a nice day&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 13:15:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BASE-SAS/m-p/364567#M86473</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-06-06T13:15:12Z</dc:date>
    </item>
  </channel>
</rss>

