<?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 output a dataset with a dynamic name rather than staic name in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/output-a-dataset-with-a-dynamic-name-rather-than-staic-name/m-p/74603#M16070</link>
    <description>I am trying to partition a input table and only want to go through the input table only once and based on the partition key to output to the table. &lt;BR /&gt;
I wonder if it is possible to output obs to a dynamic dataset name.&lt;BR /&gt;
&lt;BR /&gt;
what I plan to do is to sort the input dataset by the partition key variable, then output to a new dataset when a new partitionkey is detected. however, I could not find a way to specify a output dataset name dynamically. &lt;BR /&gt;
&lt;BR /&gt;
any suggestion would be appreciated.</description>
    <pubDate>Fri, 24 Sep 2010 17:59:24 GMT</pubDate>
    <dc:creator>kwu</dc:creator>
    <dc:date>2010-09-24T17:59:24Z</dc:date>
    <item>
      <title>output a dataset with a dynamic name rather than staic name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/output-a-dataset-with-a-dynamic-name-rather-than-staic-name/m-p/74603#M16070</link>
      <description>I am trying to partition a input table and only want to go through the input table only once and based on the partition key to output to the table. &lt;BR /&gt;
I wonder if it is possible to output obs to a dynamic dataset name.&lt;BR /&gt;
&lt;BR /&gt;
what I plan to do is to sort the input dataset by the partition key variable, then output to a new dataset when a new partitionkey is detected. however, I could not find a way to specify a output dataset name dynamically. &lt;BR /&gt;
&lt;BR /&gt;
any suggestion would be appreciated.</description>
      <pubDate>Fri, 24 Sep 2010 17:59:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/output-a-dataset-with-a-dynamic-name-rather-than-staic-name/m-p/74603#M16070</guid>
      <dc:creator>kwu</dc:creator>
      <dc:date>2010-09-24T17:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: output a dataset with a dynamic name rather than staic name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/output-a-dataset-with-a-dynamic-name-rather-than-staic-name/m-p/74604#M16071</link>
      <description>Hi&lt;BR /&gt;
I would say this can't be done with one pass through the data as the output data sets are defined during compilation time but you only know how many and which names of data sets you need during execution time.&lt;BR /&gt;
&lt;BR /&gt;
A possible approach would be to add a data _null_ step creating the SAS syntax you need, write this syntax to  a temporay file and then %include this file after the data _null_ step to get it executed.&lt;BR /&gt;
&lt;BR /&gt;
HTH&lt;BR /&gt;
Patrick</description>
      <pubDate>Sat, 25 Sep 2010 00:19:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/output-a-dataset-with-a-dynamic-name-rather-than-staic-name/m-p/74604#M16071</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2010-09-25T00:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: output a dataset with a dynamic name rather than staic name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/output-a-dataset-with-a-dynamic-name-rather-than-staic-name/m-p/74605#M16072</link>
      <description>Using the DATA step and HASH technique, you have the OUTPUT() method that can dynamically create SAS files.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument, this topic / post:&lt;BR /&gt;
hash output method documentation site:sas.com</description>
      <pubDate>Sat, 25 Sep 2010 22:22:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/output-a-dataset-with-a-dynamic-name-rather-than-staic-name/m-p/74605#M16072</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-09-25T22:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: output a dataset with a dynamic name rather than staic name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/output-a-dataset-with-a-dynamic-name-rather-than-staic-name/m-p/74606#M16073</link>
      <description>Beautyful! &lt;BR /&gt;
I didn't realise this possibility of hash object usage so far.&lt;BR /&gt;
&lt;BR /&gt;
Thanks a lot, Scott!</description>
      <pubDate>Sun, 26 Sep 2010 10:59:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/output-a-dataset-with-a-dynamic-name-rather-than-staic-name/m-p/74606#M16073</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2010-09-26T10:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: output a dataset with a dynamic name rather than staic name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/output-a-dataset-with-a-dynamic-name-rather-than-staic-name/m-p/74607#M16074</link>
      <description>This paper addresses the topic.&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://analytics.ncsu.edu/sesug/2008/SBC-119.pdf" target="_blank"&gt;http://analytics.ncsu.edu/sesug/2008/SBC-119.pdf&lt;/A&gt;</description>
      <pubDate>Sun, 26 Sep 2010 15:12:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/output-a-dataset-with-a-dynamic-name-rather-than-staic-name/m-p/74607#M16074</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2010-09-26T15:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: output a dataset with a dynamic name rather than staic name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/output-a-dataset-with-a-dynamic-name-rather-than-staic-name/m-p/74608#M16075</link>
      <description>Your guys are rock!!! &lt;BR /&gt;
Thank you all very much indeed.</description>
      <pubDate>Mon, 27 Sep 2010 14:16:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/output-a-dataset-with-a-dynamic-name-rather-than-staic-name/m-p/74608#M16075</guid>
      <dc:creator>kwu</dc:creator>
      <dc:date>2010-09-27T14:16:07Z</dc:date>
    </item>
  </channel>
</rss>

