<?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 can I append a dataset name to other datasetname in sas in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/can-I-append-a-dataset-name-to-other-datasetname-in-sas/m-p/111968#M23184</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am newbie to sas, pl help me if this is possible in sas (if it is a valid question!!). I am using SAS EG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-I have a macro 1)which takes dataset(lets call it as master dataset), 2)does few things to master dataset and 3)then outs 10 new datasets(decile datasets) using proc rank&lt;/P&gt;&lt;P&gt;-in 'output data' window I can see the master dataset and 10 decile dataset and I can export them to excel file and everything is fine.&lt;/P&gt;&lt;P&gt;-above works if I call macro only once. If I call&amp;nbsp; this macro more than once, then I see the values for only 1 decile dataset (apparently they are being overwritten)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I distinguish between the naming of decile datasets of one master set with the naming of other decile datasets (so that I can preserve them).&lt;/P&gt;&lt;P&gt;May be I can make the decile datasetname unique by appending the name of master dataset name that I get in macro (is this possible)?&lt;/P&gt;&lt;P&gt;or may be should I write the decile datasets to a file (if so how can I retrieve the name of the master dataset from the macro parameter)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 17 Feb 2013 16:24:49 GMT</pubDate>
    <dc:creator>kashili</dc:creator>
    <dc:date>2013-02-17T16:24:49Z</dc:date>
    <item>
      <title>can I append a dataset name to other datasetname in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/can-I-append-a-dataset-name-to-other-datasetname-in-sas/m-p/111968#M23184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am newbie to sas, pl help me if this is possible in sas (if it is a valid question!!). I am using SAS EG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-I have a macro 1)which takes dataset(lets call it as master dataset), 2)does few things to master dataset and 3)then outs 10 new datasets(decile datasets) using proc rank&lt;/P&gt;&lt;P&gt;-in 'output data' window I can see the master dataset and 10 decile dataset and I can export them to excel file and everything is fine.&lt;/P&gt;&lt;P&gt;-above works if I call macro only once. If I call&amp;nbsp; this macro more than once, then I see the values for only 1 decile dataset (apparently they are being overwritten)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I distinguish between the naming of decile datasets of one master set with the naming of other decile datasets (so that I can preserve them).&lt;/P&gt;&lt;P&gt;May be I can make the decile datasetname unique by appending the name of master dataset name that I get in macro (is this possible)?&lt;/P&gt;&lt;P&gt;or may be should I write the decile datasets to a file (if so how can I retrieve the name of the master dataset from the macro parameter)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Feb 2013 16:24:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/can-I-append-a-dataset-name-to-other-datasetname-in-sas/m-p/111968#M23184</guid>
      <dc:creator>kashili</dc:creator>
      <dc:date>2013-02-17T16:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: can I append a dataset name to other datasetname in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/can-I-append-a-dataset-name-to-other-datasetname-in-sas/m-p/111969#M23185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please show the code you use&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Feb 2013 17:26:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/can-I-append-a-dataset-name-to-other-datasetname-in-sas/m-p/111969#M23185</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2013-02-17T17:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: can I append a dataset name to other datasetname in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/can-I-append-a-dataset-name-to-other-datasetname-in-sas/m-p/111970#M23186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here is the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro LMGenerate(mymktdata);&lt;BR /&gt;proc rank data=mymktdata out=deciledrankedscores ties= low descending groups=10;&lt;BR /&gt; var LM12value;&lt;BR /&gt; ranks decile;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data decile_0&amp;nbsp; decile_1&amp;nbsp; decile_2&amp;nbsp; decile_3&amp;nbsp; decile_4&amp;nbsp; decile_5&amp;nbsp; decile_6&amp;nbsp; decile_7&amp;nbsp; decile_8&amp;nbsp; decile_9;&lt;BR /&gt; set deciledrankedscores;&lt;BR /&gt; select(decile);&lt;BR /&gt;&amp;nbsp; when (0) output decile_0;/* can I make this output as..."output nameof(mymktdata)+decile_0"*/&lt;BR /&gt;&amp;nbsp; when (1) output decile_1;/*I need to change the output data sets names to all of the following in the same naming way as above*/&lt;BR /&gt;&amp;nbsp; when (2) output decile_2;&lt;BR /&gt;&amp;nbsp; when (3) output decile_3;&lt;BR /&gt;&amp;nbsp; when (4) output decile_4;&lt;BR /&gt;&amp;nbsp; when (5) output decile_5;&lt;BR /&gt;&amp;nbsp; when (6) output decile_6;&lt;BR /&gt;&amp;nbsp; when (7) output decile_7;&lt;BR /&gt;&amp;nbsp; when (8) output decile_8;&lt;BR /&gt;&amp;nbsp; when (9) output decile_9;&lt;BR /&gt;&amp;nbsp; otherwise;&lt;BR /&gt; end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;%mend&amp;nbsp; LMGenerate;&lt;/P&gt;&lt;P&gt;%LMGenerate(yr2011mktdata)&lt;BR /&gt;%LMGenerate(yr2010mktdata)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Feb 2013 21:24:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/can-I-append-a-dataset-name-to-other-datasetname-in-sas/m-p/111970#M23186</guid>
      <dc:creator>kashili</dc:creator>
      <dc:date>2013-02-17T21:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: can I append a dataset name to other datasetname in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/can-I-append-a-dataset-name-to-other-datasetname-in-sas/m-p/111971#M23187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;try the code below:&lt;/P&gt;&lt;P&gt;%macro LMGenerate(mymktdata);&lt;/P&gt;&lt;P&gt;proc rank data=&amp;amp;mymktdata out=deciledrankedscores ties= low descending groups=10;&lt;/P&gt;&lt;P&gt;var LM12value;&lt;/P&gt;&lt;P&gt;ranks decile;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data &amp;amp;mymktdata.decile_0&amp;nbsp; &amp;amp;mymktdata.decile_1&amp;nbsp; &amp;amp;mymktdata.decile_2&amp;nbsp; &amp;amp;mymktdata.decile_3&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;mymktdata.decile_4&amp;nbsp; &amp;amp;mymktdata.decile_5&amp;nbsp; &amp;amp;mymktdata.decile_6&amp;nbsp; &amp;amp;mymktdata.decile_7&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;mymktdata.decile_8&amp;nbsp; &amp;amp;mymktdata.decile_9;&lt;/P&gt;&lt;P&gt;set deciledrankedscores;&lt;/P&gt;&lt;P&gt;select(decile);&lt;/P&gt;&lt;P&gt;&amp;nbsp; when (0) output &amp;amp;mymktdata.decile_0;/* can I make this output as..."output nameof(mymktdata)+&amp;amp;mymktdata.decile_0"*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; when (1) output &amp;amp;mymktdata.decile_1;/*I need to change the output data sets names to all of the following in the same naming way as above*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; when (2) output &amp;amp;mymktdata.decile_2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; when (3) output &amp;amp;mymktdata.decile_3;&lt;/P&gt;&lt;P&gt;&amp;nbsp; when (4) output &amp;amp;mymktdata.decile_4;&lt;/P&gt;&lt;P&gt;&amp;nbsp; when (5) output &amp;amp;mymktdata.decile_5;&lt;/P&gt;&lt;P&gt;&amp;nbsp; when (6) output &amp;amp;mymktdata.decile_6;&lt;/P&gt;&lt;P&gt;&amp;nbsp; when (7) output &amp;amp;mymktdata.decile_7;&lt;/P&gt;&lt;P&gt;&amp;nbsp; when (8) output &amp;amp;mymktdata.decile_8;&lt;/P&gt;&lt;P&gt;&amp;nbsp; when (9) output &amp;amp;mymktdata.decile_9;&lt;/P&gt;&lt;P&gt;&amp;nbsp; otherwise;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%mend&amp;nbsp; LMGenerate;&lt;/P&gt;&lt;P&gt;%LMGenerate(yr2011mktdata)&lt;/P&gt;&lt;P&gt;%LMGenerate(yr2010mktdata)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Feb 2013 23:01:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/can-I-append-a-dataset-name-to-other-datasetname-in-sas/m-p/111971#M23187</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2013-02-17T23:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: can I append a dataset name to other datasetname in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/can-I-append-a-dataset-name-to-other-datasetname-in-sas/m-p/111972#M23188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;super..it works. you made my first post on this website productive. thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2013 02:54:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/can-I-append-a-dataset-name-to-other-datasetname-in-sas/m-p/111972#M23188</guid>
      <dc:creator>kashili</dc:creator>
      <dc:date>2013-02-18T02:54:13Z</dc:date>
    </item>
  </channel>
</rss>

