<?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: Is there a way to provide read access to sas data / view but mask/hide the physical path in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/476793#M122723</link>
    <description>&lt;P&gt;Not sure if this will work, but it's worth a try ....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a second view that is a view of the first view.&amp;nbsp; For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;view 1a:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data LIBV.dsn_view_of_master1a / view=LIBV.dsn_view_of_master1a;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;set LIBV.dsn_view_of_master;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Give the user instructions to use LIBV.dsn_view_of_master1a&lt;/P&gt;</description>
    <pubDate>Tue, 10 Jul 2018 13:21:11 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2018-07-10T13:21:11Z</dc:date>
    <item>
      <title>Is there a way to provide read access to sas data / view but mask/hide the physical path</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/476687#M122684</link>
      <description>&lt;P&gt;Is it possible to create a sas table/view where the originating data path is either masked or hidden from sasuser/developer?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Scenario&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Lets say we have a sas dataset &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;LIB_A.master1&lt;/STRONG&gt;&lt;/FONT&gt; @&amp;nbsp;physical location "&lt;FONT color="#0000FF"&gt;/sourcedata_A/master1.sas7bdat&lt;/FONT&gt;"&lt;/P&gt;
&lt;P&gt;Lets say we have a sas dataset&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;LIB_B.master2&lt;/STRONG&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;@&amp;nbsp;physical location "&lt;FONT color="#0000FF"&gt;/sourcedata_B/master2.sas7bdat&lt;/FONT&gt;"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;we create a sas view of this dataset as&amp;nbsp;&lt;FONT color="#993300"&gt;&lt;FONT color="#008000"&gt;LIBV.dsn_view_of_master1 @&amp;nbsp;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;physical location "&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#008000"&gt;/views/view_of_master1.sas7bvew&lt;/FONT&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;we create an sql view of this dataset as&amp;nbsp;&lt;FONT color="#993300"&gt;&lt;FONT color="#008000"&gt;LIBV.sql_view_of_master2 @&amp;nbsp;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;physical location "&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#008000"&gt;/views/view_of_master2.sas7bvew&lt;/FONT&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;view 1:&lt;/P&gt;
&lt;P&gt;data LIBV.dsn_view_of_master1 def/view=LIBV.dsn_view_of_master1;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;set LIB_A.master1;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;view2:&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;create view LIBV.sql_view_of_master2 as&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;Select * from&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;LIB_A.master2&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So is there a way of hiding/masking the library file path of the source data?... ie the filepath of sas datasets LIB_A.master1 and LIB_B.master2?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I understand this is a little intersting... why would one want to hide the source path of the actual source data?... and views are not usually accessible if the underlying definition (source data paths are also not accessible).&lt;/P&gt;
&lt;P&gt;However the suggestion given to me in seeking a solution to this problem is to detract/prevent the developer/sasuser from mapping directly onto the source folder path, without generating an additional copy of the source data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas?&lt;/P&gt;
&lt;P&gt;thanks Aurelio&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 08:13:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/476687#M122684</guid>
      <dc:creator>Aurelio</dc:creator>
      <dc:date>2018-07-10T08:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to provide read access to sas data / view but mask/hide the physical path</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/476700#M122690</link>
      <description>&lt;P&gt;Hi, no this is not possible. A copy has to be done one way or the other&amp;nbsp;or the path can be revealed.&amp;nbsp;But with enough system ressources you could create a copy of the dataset in memory and delete the original path.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname tmp "C:\Temp\source";
libname tmp1 "C:\Temp\mymemlib" memlib;

data tmp1.class;
   set tmp.class;
run;

libname tmp clear;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Jul 2018 09:17:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/476700#M122690</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2018-07-10T09:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to provide read access to sas data / view but mask/hide the physical path</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/476793#M122723</link>
      <description>&lt;P&gt;Not sure if this will work, but it's worth a try ....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a second view that is a view of the first view.&amp;nbsp; For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;view 1a:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data LIBV.dsn_view_of_master1a / view=LIBV.dsn_view_of_master1a;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;set LIBV.dsn_view_of_master;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Give the user instructions to use LIBV.dsn_view_of_master1a&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 13:21:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/476793#M122723</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-07-10T13:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to provide read access to sas data / view but mask/hide the physical path</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/476867#M122743</link>
      <description>&lt;P&gt;This would be a good application for SAS/Share if I understand your need properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With SAS/Share, you'd define the libref inside the SAS/Share server's configuration. Users would the do their libname to the SAS/Share server refering the "alias" libref instead of the actual location.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 16:47:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/476867#M122743</guid>
      <dc:creator>ybolduc</dc:creator>
      <dc:date>2018-07-10T16:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to provide read access to sas data / view but mask/hide the physical path</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/477035#M122800</link>
      <description>&lt;P&gt;I think it can be done using SQL, e.g.:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
  create view libv.view_of_master1(alter=&amp;lt;password&amp;gt;)
  as select * from lib_a.master1
  using libname lib_a "/sourcedata_A";
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then the libname LIB_A is hardcoded in the view, and does not have to be allocated by the user. And in order to see the physical location by using DESCRIBE VIEW, you must know the password.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 11:07:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/477035#M122800</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2018-07-11T11:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to provide read access to sas data / view but mask/hide the physical path</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/477101#M122818</link>
      <description>I get the path of lib_a without knowing the password, simply by editing the view with an Editor. Among all binary signs the path remains readable.</description>
      <pubDate>Wed, 11 Jul 2018 14:20:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/477101#M122818</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2018-07-11T14:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to provide read access to sas data / view but mask/hide the physical path</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/477274#M122895</link>
      <description>&lt;P&gt;Thanks for suggestion...&lt;/P&gt;
&lt;P&gt;however since I have quite some number to do this for this this is not a feasible alternative for both resources or performance in our current need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;LOGICALLY thinking it through... FAIR enough&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I believe while ever a view is defined/created in SAS whether SQL or SAS dataview ... unless the base/underlying sas library, on which the view is based to source the physical data, is allocated and active when accessing the view ... then it stands to reason that the the view cannot provide an access path to that source data ... so the view fails with appropriate messages saying the source library is not available/allocated no resolvable links to the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think this is fair enough as the SAS library engine is the pathway to the data on which the view was defined.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 23:24:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/477274#M122895</guid>
      <dc:creator>Aurelio</dc:creator>
      <dc:date>2018-07-11T23:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to provide read access to sas data / view but mask/hide the physical path</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/477277#M122897</link>
      <description>&lt;P&gt;thanks for the suggestion.\&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think your suggestion is probably the most elegant way to achieve this... as it is really a DBMS type function we are trying to achieve. This is one of functions I believe SAS/SHARE is trying to emulate after all.&amp;nbsp;&amp;nbsp;The only down side to this method is the need to licensing another product.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll hang on to this this post a little longer to see what other ideas might surface before accepting the status quo ... whilst I try and test other ideas.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 23:38:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/477277#M122897</guid>
      <dc:creator>Aurelio</dc:creator>
      <dc:date>2018-07-11T23:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to provide read access to sas data / view but mask/hide the physical path</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/477283#M122900</link>
      <description>&lt;P&gt;Yes I believe this solution will work on both requirements.&amp;nbsp; thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. the source data path is stored in the view ... so not requiring an additional SAS data source library to be pre-allocated.&lt;/P&gt;
&lt;P&gt;2. the actual source data path can be masked/hidden from user... by specifying a password when creating the view, so unless the password is known the describe view will fail see sample log tested below ... if either user doesn't specify password or password is incorrectly specified the sql describe view statement will fail.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;sql&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;create view sym.view_of_Master (alter=password)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;as&amp;nbsp;select * from srce.master_table&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;using libname srce "/srce_data_path";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;quit&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;saslog...&lt;/P&gt;
&lt;P&gt;25 proc sql;&lt;BR /&gt;26 describe view &lt;SPAN&gt;sym.view_of_Master&lt;/SPAN&gt;&lt;BR /&gt;27 ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;25 proc sql;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;26 describe view&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;sym.view_of_Master (alter=XXXXXXX)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;ERROR: Invalid or missing ALTER password on member &lt;SPAN&gt;sym.view_of_Master&lt;/SPAN&gt;.&lt;/FONT&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jul 2018 01:01:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/477283#M122900</guid>
      <dc:creator>Aurelio</dc:creator>
      <dc:date>2018-07-12T01:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to provide read access to sas data / view but mask/hide the physical path</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/477289#M122901</link>
      <description>&lt;P&gt;Thanks for the reply. A view of a view functions ok, so long as the source data on which the closest view to the data is still accessible and active, but fails if the source link/library to the data is not active.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jul 2018 00:54:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/477289#M122901</guid>
      <dc:creator>Aurelio</dc:creator>
      <dc:date>2018-07-12T00:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to provide read access to sas data / view but mask/hide the physical path</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/477407#M122941</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;as I said, open the binary file sym view with Notepad and you will see where the srce table is located in clear...&lt;BR /&gt;May I ask why you would like to pseudo-hide the path?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jul 2018 11:48:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/477407#M122941</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2018-07-12T11:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to provide read access to sas data / view but mask/hide the physical path</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/478259#M123329</link>
      <description>&lt;P&gt;Hi Oligolas, &lt;BR /&gt;&lt;BR /&gt;Thanks for your reply and continued discussion on this topic.&lt;BR /&gt;&lt;BR /&gt;1. To answer your question... why hide the path to source view/data? &lt;BR /&gt;Firstly I believe the intention is to provide ANALYSTS with a new common "business data layer" (views of data), with a new set of "tables and columns", that may differ from original source tables, and without creating a copy of the data. &lt;BR /&gt;And Secondly by masking or hiding the path to the source data it would discourage/prevent "re-interpretation" of the raw data/tables through direct access to original source table/column definitions.&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;2. I tried viewing the physical SASView file (eg. view_of_master.sas7bvew) created with alter=password protection, with both notepad or notepad++. .... yes I admit one can see some text. Though the SQL view "create code" is not easily interpreted as it contains binary.. it is certainly visible to see a path and hence generate some hacker/interest.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So whilst this is not Ideal to what I was after, the create SQL view with (alter=pwd) option to hide the USING ... pathname does provide another layer of "discouragement", rather than complete SOURCE table/data definition prevention ... unless better *.sas7bvew file encryption was possible.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Aurelio&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 03:47:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-provide-read-access-to-sas-data-view-but-mask/m-p/478259#M123329</guid>
      <dc:creator>Aurelio</dc:creator>
      <dc:date>2018-07-16T03:47:13Z</dc:date>
    </item>
  </channel>
</rss>

