<?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 what does drop=i mean? I saw two programs that include this but I do not understand in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/what-does-drop-i-mean-I-saw-two-programs-that-include-this-but-I/m-p/287363#M59112</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
	create table ac as
	select *
	from ab as a left join h1(drop=  i) as b
	on a.id=b.id2
	where hb=1;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data vital(drop=i);
length vstestcd $ 10 vsstresu $ 20;
retain vstestcd "WEIGHT" vsstresu "KG";
do usubjid=1001 to 6000;
do i= 1 to 10 ;
vsstresn = floor(74.5+sqrt(276)*rannor(1688));
label
vstestcd ='Vital Parameter Name'
vsstresn ='Vital Parameter Value'
vsstresu ='Vital Parameter Unit'
;
output;
end;
end;
run;
proc sort data=vital;
by usubjid;
run;
data vital(&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 26 Jul 2016 22:48:03 GMT</pubDate>
    <dc:creator>Bal23</dc:creator>
    <dc:date>2016-07-26T22:48:03Z</dc:date>
    <item>
      <title>what does drop=i mean? I saw two programs that include this but I do not understand</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-does-drop-i-mean-I-saw-two-programs-that-include-this-but-I/m-p/287363#M59112</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
	create table ac as
	select *
	from ab as a left join h1(drop=  i) as b
	on a.id=b.id2
	where hb=1;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data vital(drop=i);
length vstestcd $ 10 vsstresu $ 20;
retain vstestcd "WEIGHT" vsstresu "KG";
do usubjid=1001 to 6000;
do i= 1 to 10 ;
vsstresn = floor(74.5+sqrt(276)*rannor(1688));
label
vstestcd ='Vital Parameter Name'
vsstresn ='Vital Parameter Value'
vsstresu ='Vital Parameter Unit'
;
output;
end;
end;
run;
proc sort data=vital;
by usubjid;
run;
data vital(&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Jul 2016 22:48:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-does-drop-i-mean-I-saw-two-programs-that-include-this-but-I/m-p/287363#M59112</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-07-26T22:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: what does drop=i mean? I saw two programs that include this but I do not understand</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-does-drop-i-mean-I-saw-two-programs-that-include-this-but-I/m-p/287366#M59114</link>
      <description>&lt;P&gt;It's the DROP data set &lt;U&gt;&lt;STRONG&gt;option&lt;/STRONG&gt;&lt;/U&gt;. Usually it would be something like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;Data set Name&amp;gt; (DROP=&amp;lt;list variables&amp;gt; Rename=&amp;lt;rename list&amp;gt; etc...)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However if you only have one variable you can omit the parentheses.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why you might see the following in code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set sashelp.class (rename=sex=gender);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Data set options are documented here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/ledsoptsref/68025/HTML/default/viewer.htm#n15goor3q758g5n1eykstufkpdhy.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/ledsoptsref/68025/HTML/default/viewer.htm#n15goor3q758g5n1eykstufkpdhy.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IMO the parenthesis requirements are inconsistent - ie you can't include them for DROP but you need them for RENAME sometimes.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 22:53:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-does-drop-i-mean-I-saw-two-programs-that-include-this-but-I/m-p/287366#M59114</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-26T22:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: what does drop=i mean? I saw two programs that include this but I do not understand</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-does-drop-i-mean-I-saw-two-programs-that-include-this-but-I/m-p/287395#M59128</link>
      <description>&lt;P&gt;Dataset option DROP= signals to drop one or more variable. It can be used on input or output.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=sashelp.class(drop=weight) out=myClass1(drop=age);
by age name;
run;

proc sql;
create table myClass2(drop=age) as
select * from sashelp.class(drop=weight)
order by age, name;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The two code blocks generate identical datasets. Variable weight is dropped on input, variable age is dropped on output after being used for sorting.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 02:45:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-does-drop-i-mean-I-saw-two-programs-that-include-this-but-I/m-p/287395#M59128</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-07-27T02:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: what does drop=i mean? I saw two programs that include this but I do not understand</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-does-drop-i-mean-I-saw-two-programs-that-include-this-but-I/m-p/287436#M59142</link>
      <description>&lt;P&gt;Do be aware that using that method of coding is not really proper SQL or SAS, it is ahybrid of the two. &amp;nbsp;This can be confusing for SQL programmers and really isn't necessary. &amp;nbsp;It comes from the use of select * - which means take all columns from table - again, this is not really good practice for SQL, you should be selecting the columns you want to appear in your new table. &amp;nbsp;Using the select * is both lazy and dangerous - for instance if a variable is removed from the contributing tables, or new ones added your code may no longer function.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 08:27:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-does-drop-i-mean-I-saw-two-programs-that-include-this-but-I/m-p/287436#M59142</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-07-27T08:27:42Z</dc:date>
    </item>
  </channel>
</rss>

