<?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: Timing Problem in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Timing-Problem/m-p/18529#M2795</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;As I said, VIEW only stores the data step statement. Once you stored it , you can change it any more.&lt;/P&gt;&lt;P&gt;For your situation, You can't change the dataset 's name in the data step.&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>Fri, 23 Dec 2011 03:12:57 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2011-12-23T03:12:57Z</dc:date>
    <item>
      <title>Timing Problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Timing-Problem/m-p/18526#M2792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have a DATA step view with a SET statement, where the data sets to be referenced in the SET statement are stored in a macro variable, is it possible to resolve this macro variable at execution time?&amp;nbsp; For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;%let ds=sashelp.class;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;data ds/view=ds;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set &amp;amp;ds;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;%let ds=sashelp.shoes;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;proc print data=ds(obs=3);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course, the above code prints the first three records of the sashelp.class data set.&amp;nbsp; Is it possible to define the view in such a way that the first three observations in sashelp.shoes are printed instead?&amp;nbsp; Thanks in advance for your input.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 12:07:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Timing-Problem/m-p/18526#M2792</guid>
      <dc:creator>polingjw</dc:creator>
      <dc:date>2011-12-21T12:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Timing Problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Timing-Problem/m-p/18527#M2793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you can't do it because view only stores the statements of dataset. you can't change it as performing. It is static.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data ds/view=ds;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set &amp;amp;ds;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%let ds=sashelp.class;&lt;/P&gt;&lt;P&gt;%let ds=sashelp.shoes;&lt;/P&gt;&lt;P&gt;proc print data=ds(obs=3);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These code will generate Errors.&lt;/P&gt;&lt;P&gt;But Why not useing Macro to instead of the view if you need to change the dataset as performing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data view=ds ;&lt;/P&gt;&lt;P&gt;describe;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to see what code exactly stored in the view.&lt;/P&gt;&lt;P&gt;&lt;/P&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>Thu, 22 Dec 2011 03:01:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Timing-Problem/m-p/18527#M2793</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-12-22T03:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: Timing Problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Timing-Problem/m-p/18528#M2794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ksharp.&amp;nbsp;&amp;nbsp; If the macro variable reference is part of an expression or an assignment statement, you can resolve it at execution time using the SYMGET or RESOLVE functions.&amp;nbsp; For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;%let sex=M;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;data class/view=class;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set sashelp.class;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where sex=symget('sex');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;%let sex=F;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;proc print data=class(obs=3);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;The problem is that I want to use the macro variable in a SET statement instead of in an expression or assignment statement.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;I know that there are many alternative solutions, such as writing a macro.&amp;nbsp; I posed the question just out of curiosity, not necessity.&amp;nbsp; As you said, it might not be possible.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Thanks again.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 11:33:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Timing-Problem/m-p/18528#M2794</guid>
      <dc:creator>polingjw</dc:creator>
      <dc:date>2011-12-22T11:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Timing Problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Timing-Problem/m-p/18529#M2795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;As I said, VIEW only stores the data step statement. Once you stored it , you can change it any more.&lt;/P&gt;&lt;P&gt;For your situation, You can't change the dataset 's name in the data step.&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>Fri, 23 Dec 2011 03:12:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Timing-Problem/m-p/18529#M2795</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-12-23T03:12:57Z</dc:date>
    </item>
  </channel>
</rss>

