<?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: Synonym in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/391985#M94236</link>
    <description>&lt;P&gt;The closest thing there is is a SAS view:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class / view=class;
set sashelp.class;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Views are generally used to do some kind of transformation, not as simple aliasses.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Aug 2017 18:56:54 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2017-08-30T18:56:54Z</dc:date>
    <item>
      <title>Synonym</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/391937#M94224</link>
      <description>&lt;P&gt;Could anyone please tell my whether sas enables create synonyms for datasets like&amp;nbsp; sql do for tables?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 17:02:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/391937#M94224</guid>
      <dc:creator>Matt3</dc:creator>
      <dc:date>2017-08-30T17:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: Synonym</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/391939#M94225</link>
      <description>&lt;P&gt;In proc sql you can use table alias instead of names if that what you mean. Out side of Proc SQL you might have to describe in some detail what you are attempting to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example in proc sql of alias:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc sql;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; select a.name&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; from sashelp.class as a&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 17:09:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/391939#M94225</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-08-30T17:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Synonym</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/391947#M94227</link>
      <description>&lt;P&gt;I mean somenthing like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;create public synonym class&lt;/P&gt;&lt;P&gt;for sashelp.class;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and then use it&amp;nbsp; anytime&lt;/P&gt;&lt;P&gt;select&amp;nbsp; *&amp;nbsp; from&amp;nbsp; klasa&lt;/P&gt;&lt;P&gt;--------&lt;/P&gt;&lt;P&gt;one way of solving this probles is to assing macro variable:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let class=sashelp.class;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data class;&lt;/P&gt;&lt;P&gt;set &amp;amp;class;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;---------------&lt;/P&gt;&lt;P&gt;Nevertheless, I wonder if in sas exist sth like sql`s synonyms.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 17:22:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/391947#M94227</guid>
      <dc:creator>Matt3</dc:creator>
      <dc:date>2017-08-30T17:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: Synonym</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/391951#M94228</link>
      <description>Since there's nothing mentioned in the documentation I'm going to say it's not likely included.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/sqlproc/69822/HTML/default/viewer.htm#n07kfcv1vbih8rn1k9epo45umxil.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/sqlproc/69822/HTML/default/viewer.htm#n07kfcv1vbih8rn1k9epo45umxil.htm&lt;/A&gt;</description>
      <pubDate>Wed, 30 Aug 2017 17:29:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/391951#M94228</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-08-30T17:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Synonym</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/391985#M94236</link>
      <description>&lt;P&gt;The closest thing there is is a SAS view:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class / view=class;
set sashelp.class;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Views are generally used to do some kind of transformation, not as simple aliasses.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 18:56:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/391985#M94236</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-08-30T18:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Synonym</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/391990#M94238</link>
      <description>&lt;P&gt;Not exactly as in PROC SQL, but depending on your situation, you might consider using macrovars.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let data1=work.myoldfile;&lt;/P&gt;
&lt;P&gt;%let data2=work.youroldfile;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; set &amp;amp;data1 &amp;amp;data2;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 19:06:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/391990#M94238</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-08-30T19:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Synonym</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/392009#M94246</link>
      <description>&lt;P&gt;I am not clear on the purpose of this question. How do you plan on using this "synonym" that a macro variable won't work?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 20:08:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/392009#M94246</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-08-30T20:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Synonym</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/392107#M94285</link>
      <description>&lt;P&gt;Macro var works, however in Oracle&amp;nbsp; synonyms are stored in db, global macro variables are stored for a period of one session.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2017 06:20:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/392107#M94285</guid>
      <dc:creator>Matt3</dc:creator>
      <dc:date>2017-08-31T06:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: Synonym</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/392110#M94287</link>
      <description>&lt;P&gt;There is nothing like that in SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are ways to have libnames defined that persist, or are always created when you start your SAS session, like the SASHELP library in your example is always defined.&lt;/P&gt;
&lt;P&gt;Not sure what value this synonym feature of Oracle adds anyway.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2017 06:35:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/392110#M94287</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-08-31T06:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: Synonym</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/392128#M94300</link>
      <description>&lt;P&gt;My understanding is that ORACLE synonyms are created so that the user can reference a table without having to worry what schema that table belongs to. As previously mentioned there's no direct equivalent in SAS - the nearest you're going to get is macro varables holding the library and data set name which you set in the autoexec file.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2017 09:31:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/392128#M94300</guid>
      <dc:creator>ChrisBrooks</dc:creator>
      <dc:date>2017-08-31T09:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Synonym</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/392226#M94347</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32246"&gt;@ChrisBrooks&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;My understanding is that ORACLE synonyms are created so that the user can reference a table without having to worry what schema that table belongs to. As previously mentioned there's no direct equivalent in SAS - the nearest you're going to get is macro varables holding the library and data set name which you set in the autoexec file.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Since SAS libnames only connect to a single schema (I think) would this approach even be useful in SAS?&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Thu, 31 Aug 2017 14:33:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/392226#M94347</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-08-31T14:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Synonym</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/392247#M94359</link>
      <description>Reeza - No, I wouldn't have thought it would be particularly useful - I know with base SAS libraries you can have two different physical folders in one concatenated library but I've always regarded that as a bad idea, whether you can do it with a SAS/ACCESS library to an RDBMS I don't know but I doubt that's a good idea either.</description>
      <pubDate>Thu, 31 Aug 2017 15:28:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/392247#M94359</guid>
      <dc:creator>ChrisBrooks</dc:creator>
      <dc:date>2017-08-31T15:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Synonym</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/392278#M94367</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/127617"&gt;@Matt3&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Macro var works, however in Oracle&amp;nbsp; synonyms are stored in db, global macro variables are stored for a period of one session.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Not sure there really is a need for this in SAS. &amp;nbsp;There is not the same concept of a "database" that contains mutliple "schemas" in SAS. You just have individual datasets and you can use librefs to facilitate referring to the datasets without having to specify the full path.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Traditionally&amp;nbsp;in SAS if you wanted to create a customized environemnt for individual projects you do that by setting up some utility macros and programs that users can use to setup a full environment with all of the librefs, filerefs, macro variables, autocall macros that they need to work on the partiular project that they need to use now. &amp;nbsp;That might be similar to the "database" concept in Oracle.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps if you are using SAS/BI type systems there are ways in the metadata manager to implement different "database" configurations that would allow you to create a customized environment for different projects.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2017 16:28:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/392278#M94367</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-08-31T16:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Synonym</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/392297#M94371</link>
      <description>&lt;P&gt;Thank you all. &amp;nbsp; Autoexec file it will be best soultion in my case .&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2017 17:12:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/392297#M94371</guid>
      <dc:creator>Matt3</dc:creator>
      <dc:date>2017-08-31T17:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: Synonym</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/392373#M94399</link>
      <description>&lt;P&gt;Since you haven't provided much detail on how this is to be used in SAS we may be missing some options.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For instance, A library can refer to multiple folders. Suppose you have existing libraries&amp;nbsp;&amp;nbsp; Alpha and Beta.&lt;/P&gt;
&lt;P&gt;LIbname Omega (Alpha Beta);&lt;/P&gt;
&lt;P&gt;Omega would contain everything in Alpha and Beta (though identically named datasets become problematic)&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Libname Combine ("Path/folder1" "Path/Folder2" "OtherPath/Folder3");&lt;/P&gt;
&lt;P&gt;could reference all of the SAS datasets in those three folders.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2017 21:07:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Synonym/m-p/392373#M94399</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-08-31T21:07:51Z</dc:date>
    </item>
  </channel>
</rss>

