<?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 a variable from this proc export? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124083#M34124</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following code creates a .csv-document that contains all the variables of the &amp;amp;_input table. This is such a newbie question, but what can I do to exclude variables from the table? In example, I want to export the input data set without a variable called "w_code".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;%let dsnid = %sysfunc(open(&amp;amp;_input));&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;%let nobs=0;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;%if &amp;amp;dsnid %then %do;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let nobs=%sysfunc(attrn(&amp;amp;dsnid,nlobs));&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let rc=%sysfunc(close(&amp;amp;dsnid));&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;%end;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;%put "&amp;amp;nobs";&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;%if &amp;amp;nobs &amp;gt; 0 %then %do;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc export data=&amp;amp;_input. &lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outfile="&amp;amp;filsti" &lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; label dbms=dlm replace;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delimiter='3B'x; *3B=Semicolon;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;%end;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Sep 2012 07:38:36 GMT</pubDate>
    <dc:creator>EinarRoed</dc:creator>
    <dc:date>2012-09-18T07:38:36Z</dc:date>
    <item>
      <title>How to remove a variable from this proc export?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124083#M34124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following code creates a .csv-document that contains all the variables of the &amp;amp;_input table. This is such a newbie question, but what can I do to exclude variables from the table? In example, I want to export the input data set without a variable called "w_code".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;%let dsnid = %sysfunc(open(&amp;amp;_input));&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;%let nobs=0;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;%if &amp;amp;dsnid %then %do;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let nobs=%sysfunc(attrn(&amp;amp;dsnid,nlobs));&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let rc=%sysfunc(close(&amp;amp;dsnid));&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;%end;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;%put "&amp;amp;nobs";&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;%if &amp;amp;nobs &amp;gt; 0 %then %do;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc export data=&amp;amp;_input. &lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outfile="&amp;amp;filsti" &lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; label dbms=dlm replace;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delimiter='3B'x; *3B=Semicolon;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;%end;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 07:38:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124083#M34124</guid>
      <dc:creator>EinarRoed</dc:creator>
      <dc:date>2012-09-18T07:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a variable from this proc export?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124084#M34125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can drop it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc export data=&amp;amp;_input.&lt;STRONG&gt;(drop=w_code)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 08:46:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124084#M34125</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-09-18T08:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a variable from this proc export?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124085#M34126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For some reason, when I do that, the w_code rows become empty yet the w_code header remains. Vice versa if I try to "keep" columns.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 09:58:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124085#M34126</guid>
      <dc:creator>EinarRoed</dc:creator>
      <dc:date>2012-09-18T09:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a variable from this proc export?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124086#M34127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry . I don't realize there would be such problem. I don't know why proc export can't drop these variables.&lt;/P&gt;&lt;P&gt;But since it all be done , maybe you need to process dataset before export it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data class;
set sashelp.class(drop=name sex);
run;

proc export data=class outfile='c:\temp\x.txt' 
replace dbms=dlm; delimiter='|'; putnames=no;
run;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 02:54:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124086#M34127</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-09-19T02:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a variable from this proc export?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124087#M34128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is a bug with proc export of delimited files.&amp;nbsp; The functionality should be there .. it is when exporting an Excel workbook.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A work around would be to get the code that proc export created in the background (i.e., press function key F4 after you run the code), and then delete all of the references to the variable(s) you want to drop.&amp;nbsp; You would have to drop them from the variable name declarations, the format declarations and the actual put statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd also recommend opening a track with Tech Support as this is clearly a bug/omission of a documented feature and should be fixed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 12:59:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124087#M34128</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-09-19T12:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a variable from this proc export?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124088#M34129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;164&amp;nbsp; proc export data=class(drop=sex&amp;nbsp; age) outfile='c:\temp\x.txt'&lt;/P&gt;&lt;P&gt;165&amp;nbsp; replace dbms=dlm;&lt;/P&gt;&lt;P&gt;165!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delimiter='|';&lt;/P&gt;&lt;P&gt;166&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WARNING: This DBMS type does not support Data Set options. The options entered will be ignored.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got the following warning when i tried. It's not dropping variables due to "This dbms type does not support data set options".&amp;nbsp; It's not a bug i guess.&amp;nbsp; They aware of this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as Art mentioned,&amp;nbsp; May be the Tech support can give a work around for this if you raise a ticket.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 18:39:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124088#M34129</guid>
      <dc:creator>jonam</dc:creator>
      <dc:date>2012-09-19T18:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a variable from this proc export?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124089#M34130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know which version of SAS you are using.&amp;nbsp; On 9.2, it runs just fine, except for the fact that it keeps the variable's format statements, keeps the variable names in the list, and includes extra tabs for the dropped variables in the output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As such, my log read:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: Variable Sex is uninitialized.&lt;/P&gt;&lt;P&gt;NOTE: Variable Age is uninitialized.&lt;/P&gt;&lt;P&gt;NOTE: The file 'c:\art\x.txt' is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Filename=c:\art\x.txt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RECFM=V,LRECL=32767,File Size (bytes)=0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Last Modified=19Sep2012:14:47:40,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create Time=10Dec2011:18:46:31&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: 20 records were written to the file 'c:\art\x.txt'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 18:50:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124089#M34130</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-09-19T18:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a variable from this proc export?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124090#M34131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is clearly a bug in PROC EXPORT as it is getting the list of variable names without honoring the DROP option. But then in the generated code it does include the DROP option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can create view to work around this.&lt;/P&gt;&lt;P&gt;proc sql ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create view export as select * from sashelp.class(drop=sex);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;proc export data=export&lt;/P&gt;&lt;P&gt; outfile=tmpfile1 replace dbms=dlm;&lt;/P&gt;&lt;P&gt; delimiter='|';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 18:58:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124090#M34131</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-09-19T18:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a variable from this proc export?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124091#M34132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I used SAS 9.3. may be that's why i'm getting this message.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2012 08:12:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124091#M34132</guid>
      <dc:creator>jonam</dc:creator>
      <dc:date>2012-09-20T08:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a variable from this proc export?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124092#M34133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried running just the code in your post, using SAS 9.1.3 and received the same warning message about "This DBMS type does not support Data Set options."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking closer at the code I realised the data set was specified as "class", so I changed it to "sashelp.class" then it worked ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2012 11:57:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124092#M34133</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2012-09-20T11:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a variable from this proc export?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124093#M34134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jonam: I think Amir is correct.&amp;nbsp; I don't get the note you mentioned on 9.3 either .. just the same bug as found in 9.2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2012 13:03:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124093#M34134</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-09-20T13:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a variable from this proc export?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124094#M34135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I am curious to know about the &lt;STRONG&gt;&amp;amp;_input&lt;/STRONG&gt;...............This is a dataset name???????????&lt;/P&gt;&lt;P&gt;I learnt few days ago file names start with an underscore.&lt;/P&gt;&lt;P&gt;Why is the underscore used infront of the dataset here????can i use it like &lt;STRONG&gt;_&amp;amp;input&lt;/STRONG&gt;?????????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also confirm:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;libname test "c:\temp\forum\tete.xls";&lt;/P&gt;&lt;P&gt;%macro test;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;%do i=1 %to &amp;amp;n;&lt;/P&gt;&lt;P&gt; %let dsn=&amp;amp;&amp;amp;id&amp;amp;i;&lt;/P&gt;&lt;P&gt;data test._&amp;amp;dsn;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*&lt;STRONG&gt;how is that this datastep is creating a file and not a dataset&lt;/STRONG&gt;??????*/&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; set sashelp.class(where=(sex="&amp;amp;dsn")); &lt;/P&gt;&lt;P&gt; run;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt; %end;&lt;/P&gt;&lt;P&gt; %mend test;&lt;/P&gt;&lt;P&gt; %test&lt;/P&gt;&lt;P&gt;libname test clear;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Great Help&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 19:33:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124094#M34135</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-09-21T19:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a variable from this proc export?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124095#M34136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To your first point the macro variable name in the originally posted code was _INPUT.&amp;nbsp; So &amp;amp;_INPUT is correct.&amp;nbsp; Some users have a naming convention of using _ prefix on local macro variables to make it easier for humans to make an educated guess about the type of macro variable.&amp;nbsp; The value of the macro variable _INPUT will need to be a valid dataset name for the program to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To your second point it is really the LIBNAME statement that is creating the .XLS file.&amp;nbsp; The programmer left off the engine specification in the LIBNAME statement, but SAS is pretty good at guessing what you mean and so will use the EXCEL engine when you point a libname to a file with .XLS extension instead of a directory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; libname test1 'c:\temp\test1.xls';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3366ff;"&gt;NOTE: Libref TEST1 was successfully assigned as follows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Engine:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXCEL&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Physical Name: c:\temp\test1.xls&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp; libname test2 'c:\temp';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #0000ff;"&gt;NOTE: Libref TEST2 was successfully assigned as follows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Engine:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; V9&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Physical Name: c:\temp&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Sep 2012 02:06:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124095#M34136</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-09-22T02:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a variable from this proc export?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124096#M34137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Tom.&lt;/P&gt;&lt;P&gt;It was very detailed. I appreciate your time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Sep 2012 01:51:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-a-variable-from-this-proc-export/m-p/124096#M34137</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-09-23T01:51:14Z</dc:date>
    </item>
  </channel>
</rss>

