<?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 Not a clear question about the drop option and drop statement ? in Programming 1 and 2</title>
    <link>https://communities.sas.com/t5/Programming-1-and-2/Not-a-clear-question-about-the-drop-option-and-drop-statement/m-p/730913#M735</link>
    <description>&lt;P&gt;Hi SAS Instructor,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Today I went through a question 1.07 in Programming 2. The question and answer are as below&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ResoluteCarbon_0-1617341000139.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56832i09A9C8894CC44BC6/image-size/large?v=v2&amp;amp;px=999" role="button" title="ResoluteCarbon_0-1617341000139.png" alt="ResoluteCarbon_0-1617341000139.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;First, to me, it is not the easiest way, and there is no way for us to judge if it is the easiest one, for me, I can do by setting the option drop right at the set statement ( it is easier because I do not need to create a new data statement for drop.&lt;/P&gt;
&lt;P&gt;Secondly, if I were the instructors, I would changed the question to :how to drop the EndDate in three implicitly output datasets but this available is still calculable (that is when we can use the data statement &lt;STRONG&gt;drop EndDate;&lt;/STRONG&gt; ) or how to drop......and this variable is non-calculable during the datatstep (at that time we set an option drop right at the &lt;STRONG&gt;set&lt;/STRONG&gt; statement).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know if I fall into any fallacy.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Apr 2021 05:27:46 GMT</pubDate>
    <dc:creator>ResoluteCarbon</dc:creator>
    <dc:date>2021-04-02T05:27:46Z</dc:date>
    <item>
      <title>Not a clear question about the drop option and drop statement ?</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/Not-a-clear-question-about-the-drop-option-and-drop-statement/m-p/730913#M735</link>
      <description>&lt;P&gt;Hi SAS Instructor,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Today I went through a question 1.07 in Programming 2. The question and answer are as below&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ResoluteCarbon_0-1617341000139.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56832i09A9C8894CC44BC6/image-size/large?v=v2&amp;amp;px=999" role="button" title="ResoluteCarbon_0-1617341000139.png" alt="ResoluteCarbon_0-1617341000139.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;First, to me, it is not the easiest way, and there is no way for us to judge if it is the easiest one, for me, I can do by setting the option drop right at the set statement ( it is easier because I do not need to create a new data statement for drop.&lt;/P&gt;
&lt;P&gt;Secondly, if I were the instructors, I would changed the question to :how to drop the EndDate in three implicitly output datasets but this available is still calculable (that is when we can use the data statement &lt;STRONG&gt;drop EndDate;&lt;/STRONG&gt; ) or how to drop......and this variable is non-calculable during the datatstep (at that time we set an option drop right at the &lt;STRONG&gt;set&lt;/STRONG&gt; statement).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know if I fall into any fallacy.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 05:27:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/Not-a-clear-question-about-the-drop-option-and-drop-statement/m-p/730913#M735</guid>
      <dc:creator>ResoluteCarbon</dc:creator>
      <dc:date>2021-04-02T05:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: Not a clear question about the drop option and drop statement ?</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/Not-a-clear-question-about-the-drop-option-and-drop-statement/m-p/730922#M736</link>
      <description>&lt;P&gt;Since we are being asked how to most easiest way to drop from three tables in a data step, we will consider the following three methods.&lt;BR /&gt;1st. Use the drop= dataset option in the data statement.&lt;BR /&gt;2nd. Use the drop= dataset option in a set statement.&lt;BR /&gt;3rd. Use the drop statement.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Of these, 2nd is not suitable because it will not be able to calculate the EndDate - StartDate.&lt;BR /&gt;1st. and 3rd. are almost the same, but with drop= dataset option, you need to write three, whereas with the drop statement, you only need to write one, so the answer is the drop statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think it is clear question.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 06:55:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/Not-a-clear-question-about-the-drop-option-and-drop-statement/m-p/730922#M736</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2021-04-02T06:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Not a clear question about the drop option and drop statement ?</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/Not-a-clear-question-about-the-drop-option-and-drop-statement/m-p/730923#M737</link>
      <description>&lt;P&gt;In this case you can't drop ENDDATE from input because you need it to calculate StormLength.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you use DROP statement it relates to all output data sets, and you need not enter the DROP option for &lt;U&gt;each&lt;/U&gt; output data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 07:18:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/Not-a-clear-question-about-the-drop-option-and-drop-statement/m-p/730923#M737</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2021-04-02T07:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Not a clear question about the drop option and drop statement ?</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/Not-a-clear-question-about-the-drop-option-and-drop-statement/m-p/730992#M738</link>
      <description>&lt;P&gt;If your source data is not clean you may have to use a dataset option to drop one or more variables because they are of a different type in some data sets.&lt;/P&gt;
&lt;PRE&gt;data junk1;
   x='1234';
   y=42;
run;
data junk2;
  x=123;
  y= 56;
run;

/* this fails because X is both numeric and character*/
data combined;
   set junk1
       junk2
   ;
   drop x;
run;
/* this works because only one type of x makes it into
   the data vector
*/
data combined2;
   set junk1 (drop=x)
       junk2
   ;
   drop x;
run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Apr 2021 15:14:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/Not-a-clear-question-about-the-drop-option-and-drop-statement/m-p/730992#M738</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-04-02T15:14:52Z</dc:date>
    </item>
  </channel>
</rss>

