<?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 SAS query in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SAS-query/m-p/62745#M17875</link>
    <description>hello ,&lt;BR /&gt;
&lt;BR /&gt;
Plz guide me.I want to save the data with the dropped varaibles.In the log window the dropeed varaibles dont exist , bur t when i save the data and run it in windows , the dropped variables exist , which i dont want when i open the SAS file " result.sas7bdat "&lt;BR /&gt;
&lt;BR /&gt;
data sc.result;&lt;BR /&gt;
   set period1;&lt;BR /&gt;
    DateTimeofSale = DateofSale||":"||TimeofSale;&lt;BR /&gt;
run; &lt;BR /&gt;
proc print data = result(drop= DateofSale TimeofSale);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
kind  regards ,&lt;BR /&gt;
&lt;BR /&gt;
markc</description>
    <pubDate>Sat, 27 Feb 2010 21:34:42 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-02-27T21:34:42Z</dc:date>
    <item>
      <title>SAS query</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-query/m-p/62745#M17875</link>
      <description>hello ,&lt;BR /&gt;
&lt;BR /&gt;
Plz guide me.I want to save the data with the dropped varaibles.In the log window the dropeed varaibles dont exist , bur t when i save the data and run it in windows , the dropped variables exist , which i dont want when i open the SAS file " result.sas7bdat "&lt;BR /&gt;
&lt;BR /&gt;
data sc.result;&lt;BR /&gt;
   set period1;&lt;BR /&gt;
    DateTimeofSale = DateofSale||":"||TimeofSale;&lt;BR /&gt;
run; &lt;BR /&gt;
proc print data = result(drop= DateofSale TimeofSale);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
kind  regards ,&lt;BR /&gt;
&lt;BR /&gt;
markc</description>
      <pubDate>Sat, 27 Feb 2010 21:34:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-query/m-p/62745#M17875</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-02-27T21:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: SAS query</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-query/m-p/62746#M17876</link>
      <description>In the code you show, you are creating a PERMANENT dataset in the SC library: &lt;B&gt;SC.RESULT&lt;/B&gt;.&lt;BR /&gt;
&lt;BR /&gt;
In your PROC PRINT, you have 2 issues:&lt;BR /&gt;
1) you are printing just with a 1-level name -- which means that you are printing WORK.RESULT, &lt;B&gt;&lt;U&gt;not&lt;/U&gt;&lt;/B&gt; SC.RESULT. I assume you want to print the most current SC.RESULT. In a subsequent session, WORK.RESULT may not exist.&lt;BR /&gt;
              &lt;BR /&gt;
2) the DROP= option in the PROC PRINT &lt;B&gt;&lt;U&gt;only&lt;/U&gt;&lt;/B&gt; applies to WORK.RESULT and the display of the variables. The variables will still exist in the data set (whether in WORK or SC library).&lt;BR /&gt;
 &lt;BR /&gt;
If you want to permanently drop the variables from the SC.RESULT dataset, then you either need to use the DROP statement in your DATA step program or you need to use the DROP= option for SC.RESULT. Putting the DROP= in the PROC PRINT step will NOT drop the variables from the dataset.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Sun, 28 Feb 2010 00:16:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-query/m-p/62746#M17876</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-02-28T00:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: SAS query</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-query/m-p/62747#M17877</link>
      <description>Thankyou Cynthia.Kindly suggest me on this.I use the following code :&lt;BR /&gt;
&lt;BR /&gt;
data result;&lt;BR /&gt;
		set period1;&lt;BR /&gt;
		DateTimeofSale = DateofSale||":"||TimeofSale;&lt;BR /&gt;
		DateofSale=datepart(DateTimeofSale);&lt;BR /&gt;
  		SameDayDelivery=timepart(DateTimeofSale)&amp;lt;='15:00't;&lt;BR /&gt;
		drop= DateofSale TimeofSale;&lt;BR /&gt;
proc print data = result;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
it doesnt give me the dateofsale and sameday delivery.The log  -&lt;BR /&gt;
&lt;BR /&gt;
323          SameDayDelivery=timepart(DateTimeofSale)&amp;lt;='15:00't;&lt;BR /&gt;
324          drop= DateofSale TimeofSale;&lt;BR /&gt;
                              ----------&lt;BR /&gt;
                              22&lt;BR /&gt;
&lt;BR /&gt;
ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, *, **, +, -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =,&lt;BR /&gt;
              &amp;gt;, &amp;gt;&amp;lt;, &amp;gt;=, AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL, NOTIN, OR, ^=, |, ||,&lt;BR /&gt;
              ~=.&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).&lt;BR /&gt;
      322:29   323:34   324:15   324:26&lt;BR /&gt;
NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).&lt;BR /&gt;
      322:20&lt;BR /&gt;
NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;
WARNING: The data set WORK.RESULT may be incomplete.  When this step was stopped there were 0&lt;BR /&gt;
         observations and 9 variables.&lt;BR /&gt;
WARNING: Data set WORK.RESULT was not replaced because this step was stopped.</description>
      <pubDate>Sun, 28 Feb 2010 03:36:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-query/m-p/62747#M17877</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-02-28T03:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: SAS query</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-query/m-p/62748#M17878</link>
      <description>the code i've used is -&lt;BR /&gt;
&lt;BR /&gt;
data result;&lt;BR /&gt;
		set period1;&lt;BR /&gt;
		DateTimeofSale = DateofSale||":"||TimeofSale;&lt;BR /&gt;
		DateofSale=datepart(DateTimeofSale);&lt;BR /&gt;
  		SameDayDelivery=timepart(DateTimeofSale)&amp;lt;='15:00't;&lt;BR /&gt;
		drop= DateofSale TimeofSale;&lt;BR /&gt;
proc print data = result;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
but it doesnt give me the Sameday delivey and the dateofsale.&lt;BR /&gt;
&lt;BR /&gt;
kindly  guide.&lt;BR /&gt;
markc</description>
      <pubDate>Sun, 28 Feb 2010 03:38:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-query/m-p/62748#M17878</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-02-28T03:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: SAS query</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-query/m-p/62749#M17879</link>
      <description>You have two related posts going, given this one is now piggy-backed with a second query/topic.  Suggest you consolidate them and look here for a reply, suggesting DOC review once again:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?threadID=8817&amp;amp;tstart=0" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?threadID=8817&amp;amp;tstart=0&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Sun, 28 Feb 2010 14:23:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-query/m-p/62749#M17879</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-02-28T14:23:54Z</dc:date>
    </item>
  </channel>
</rss>

