<?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: Can I derive the libname from a Data Source or Data Source Item prompt output? in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100744#M3708</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A __default_attr="726767" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;While I'm happy writing stored processes, I tend to hand write the source code for them.&amp;nbsp; And in that code I rarely uses a metadata library.&amp;nbsp; I tend to use base engine libraries or whatever engine I need for a data source.&amp;nbsp; Many of my datasets are never registered in the metadata.&amp;nbsp; Some down sides of this approach are that I don't have all the security benefits of libraries/datasets defined in the metadata.&amp;nbsp; (But I'm okay with that, since I can still control access to the stored process itself, and I haven't been working with sensitive data).&amp;nbsp; And if one day we move servers, updating the metadata libraries won't point my stored process toward a new physical locations of the data. (But I'm okay cuz most of the locations/dataset names in my code are dynamically derived from macros or other project data).&amp;nbsp; But the BI framework is obviously centered around metadata.&amp;nbsp; With lots of benefits beyond the two I've mentioned.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;All our libraries are pre-assigned (no, I didn't come up with this policy).&amp;nbsp; And our batch jobs use the -metaautoresources "SASApp" option.&amp;nbsp; So, all our libraries are assigned, whether in EG (Workspace Server), Stored Process Server, or batch job.&amp;nbsp; We do use security to restrict access (allocation) to particular user groups.&amp;nbsp; I'm happy to use a metadata library allocation, i.e. the meta engine, but there is no need.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;So as an old SAS school programmer, if I had a &amp;amp;data prompt, I (like you) would want a simple prompt to select a libname (or physical path), data set name, etc. Like SAS/AF or whatever.&amp;nbsp; And were I to have a problem like yours, I would likely approach it as you did.&amp;nbsp; (Except that sashelp.vcolumn is so big, I'd probably have a separate nightly job to make small datasets for these dynamic prompts).&lt;/P&gt;
&lt;/PRE&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;I made a snapshot of sashelp.vcolumn for a single library.&amp;nbsp; It reduced the number of columns from say 40,000 to 4,000.&amp;nbsp; Still a lot, but filtering a list of 4,000 columns should be quite quick (depending on the server specs).&amp;nbsp; It still had very poor performance with respect to the initial GUI display.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;After the user has selected the datasource and datasource items, my STP code needs to know which datasource (SAS dataset) and datasource item (SAS dataset column) the user selected.&amp;nbsp; The default SAS macro variables created by the prompt manager does not provide this information (but it can be derived via Vince's macro).&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;But since the entire BI framework is about metadata, it's not surprising to me that when you use the data prompts, you get metadata information.&amp;nbsp; The BI approach is trying to get folks to do more with metadata, and less with libnames/data set names written in code.&amp;nbsp; See for example recent addition of metadata-bound libraries.&amp;nbsp; &lt;A class="jive-link-external-small" href="http://www.notecolon.info/2012/11/note-metadata-bound-libraries.html" style="font-style: inherit; font-family: inherit; color: #0e66ba;"&gt;http://www.notecolon.info/2012/11/note-metadata-bound-libraries.html&lt;/A&gt;&amp;nbsp;&amp;nbsp; I guess the mantra from that perspective would be: more metadata usage means more security and easier server administration and easier usage for business analysts.&lt;/P&gt;
&lt;/PRE&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Maybe.&amp;nbsp; I still assert that displaying the metadata path to the end-user via the baked-in GUI elements is not good, esp. without giving the STP developer the chance to hide the path.&amp;nbsp; I just want the user to pick a column!&amp;nbsp; S/he could care less about the path to the metadata table object.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;As for your request for an example where knowing metadata source path for a dataset would be useful to a stored process developer, I guess it depends on how the metadata paths are set up.&amp;nbsp; For example, if metadata paths were informative, such as Data/Dev/DataX vs Data/Prod/DataX, then I can see how I might want to know the metadata path for the dataset selected by a user, so that I could determine whether they are analyzing /Dev data or /Prod data.&lt;/P&gt;
&lt;/PRE&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Our metadata paths do show this information.&amp;nbsp; I still don't want to display the path to the end user.&amp;nbsp; The user will know the environment s/he has selected by the library from which they selected the datasource.&amp;nbsp; And the environment (Dev or Prod) is not dependent on the metadata path.&amp;nbsp; If I move the table objects to path foo and bar, it will still be Dev or Prod metadata.&amp;nbsp; So I don't like the idea of binding the environment to the metadata path.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Oct 2013 03:29:08 GMT</pubDate>
    <dc:creator>ScottBass</dc:creator>
    <dc:date>2013-10-14T03:29:08Z</dc:date>
    <item>
      <title>Can I derive the libname from a Data Source or Data Source Item prompt output?</title>
      <link>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100733#M3697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say I have a Stored Process (STP) with a Data Source and Data Source Item prompt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The generated macro variables will look something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATASOURCE=/Shared Data/CLASS(Table)&lt;/P&gt;&lt;P&gt;DATASOURCE_TYPE=1&lt;/P&gt;&lt;P&gt;COLUMN=Name&lt;/P&gt;&lt;P&gt;COLUMN0=5&lt;/P&gt;&lt;P&gt;COLUMN1=Name&lt;/P&gt;&lt;P&gt;COLUMN2=Sex&lt;/P&gt;&lt;P&gt;COLUMN3=Age&lt;/P&gt;&lt;P&gt;COLUMN4=Height&lt;/P&gt;&lt;P&gt;COLUMN5=Weight&lt;/P&gt;&lt;P&gt;COLUMN_COUNT=5&lt;/P&gt;&lt;P&gt;COLUMN_PATH=/Shared Data/CLASS&lt;/P&gt;&lt;P&gt;COLUMN_PATH1=/Shared Data/CLASS&lt;/P&gt;&lt;P&gt;COLUMN_PATH2=/Shared Data/CLASS&lt;/P&gt;&lt;P&gt;COLUMN_PATH3=/Shared Data/CLASS&lt;/P&gt;&lt;P&gt;COLUMN_PATH4=/Shared Data/CLASS&lt;/P&gt;&lt;P&gt;COLUMN_PATH5=/Shared Data/CLASS&lt;/P&gt;&lt;P&gt;COLUMN_SOURCE_TYPE=1&lt;/P&gt;&lt;P&gt;COLUMN_SOURCE_TYPE1=1&lt;/P&gt;&lt;P&gt;COLUMN_SOURCE_TYPE2=1&lt;/P&gt;&lt;P&gt;COLUMN_SOURCE_TYPE3=1&lt;/P&gt;&lt;P&gt;COLUMN_SOURCE_TYPE4=1&lt;/P&gt;&lt;P&gt;COLUMN_SOURCE_TYPE5=1&lt;/P&gt;&lt;P&gt;COLUMN_TYPE=1&lt;/P&gt;&lt;P&gt;COLUMN_TYPE1=1&lt;/P&gt;&lt;P&gt;COLUMN_TYPE2=1&lt;/P&gt;&lt;P&gt;COLUMN_TYPE3=2&lt;/P&gt;&lt;P&gt;COLUMN_TYPE4=2&lt;/P&gt;&lt;P&gt;COLUMN_TYPE5=2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Minor question, just curious:&amp;nbsp; If I look at the properties of the SASHELP.CLASS table object via SMC while in the Data Library manager, under the Physical Storage tab I see:&amp;nbsp; DBMS: SAS; Library: SASHELP; Name: CLASS.&amp;nbsp; If I look at the properties of the SASHELP.CLASS table object while in the Folder containing the object itself, I don't get the Physical Storage tab.&amp;nbsp; Why would the properties window be different based on where I view the properties from? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other table objects generated from our production libraries have Library entries like:&amp;nbsp; My Favourite Library and Some Library With a User-Friendly Name (i.e. library names as the user sees them in EG).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Given that the table object appears to store the Library name as part of its metadata:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Given the metadata path to the table object name (i.e. DATASOURCE=/Shared Data/CLASS(Table) ), is there any way I can derive the libref of that table object in my stored process code? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Can anyone enlighten me why SAS returns DATASOURCE=/Shared Data/CLASS(Table) and COLUMN_PATH1=/Shared Data/CLASS for Data Source and Data Source Items?&amp;nbsp; IMO SAS should return DATASOURCE=SASHELP.CLASS and COLUMN_PATH1=SASHELP.CLASS, or perhaps COLUMN1=SASHELP.CLASS.Name instead, and ditch COLUMN_PATH1 altogether.&amp;nbsp; Is there any reason why a stored process developer would be interested in the metadata item path rather than the "location" (i.e. libname.memname) that the metadata table item represents?&amp;nbsp; Am I missing something here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) The end-user GUI displays the Data Source metadata path for the Data Source Item, i.e. a table with Data Source Item and Data Source columns.&amp;nbsp; Can anyone envision a scenario where this information would be of interest to the end user?&amp;nbsp; IMO my end users will find this confusing - they could care less where the table object is stored in the metadata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) I'd like my end user to select a Data Source, then the downstream Data Source Item prompts would be dependent on the chosen Data Source.&amp;nbsp; Is there any way to setup this dependency?&amp;nbsp; (I assume No, but perhaps a little birdie will share the undocumented way to implement this).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5) (Minor):&amp;nbsp; What's the difference between COLUMN0 and COLUMN_COUNT?&amp;nbsp; Why have both?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 07:59:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100733#M3697</guid>
      <dc:creator>ScottBass</dc:creator>
      <dc:date>2013-10-02T07:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can I derive the libname from a Data Source or Data Source Item prompt output?</title>
      <link>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100734#M3698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Here's my .02 on your questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) I believe you have to look in the metadata for the LIBREF. I am not sure what you mean by "derive". The SASHELP datasets are probably not a good choice for an example because the SASHELP datasets are all in Shared Data folders, I think. So they are inherently different from your own tables and data sources&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) DATASOURCE is the METADATA location -- that is NOT a physical disk drive location; nor is it the lib.data name. DATASOURCE is only something that "lives" in the metadata. DATASOURCE_ITEM is the equivalent of the column name in a table, in your example, they are the same. But, since the DATASOURCE could be an information map, the DATASOURCE_ITEM might not be a physical column in the data -- it might be something that is coming from the information map. The DATASOURCE prompts can only see into a SAS Folder metadata location to select a cube, information map or table. If the DATASOURCE_TYPE=1, then the datasource is a table; 2= OLAP cube; 4= infomap based on relational data; 8= info map based on OLAP cube. DATASOURCEITEM allows user to select data items from either tables or infomaps which are based on relational tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) I do not normally surface these to end users, but sometimes use them for my own testing as hidden prompts or prompts whose values I set during testing with %LET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) The rule for dependent prompts is that the prompt type MUST be text, numeric or date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5) COLUMN0 (as an indicator of how many selections the user made) is compatible with the original "workings" of the Stored Process Server (which was compatible with the SAS/Intrnet Application Dispatcher server). COLUMN_COUNT is the updated way of showing number of prompt selections. The numbers should be the same. In some instances, &lt;EM&gt;&lt;STRONG&gt;prompt&lt;/STRONG&gt;&lt;/EM&gt;0 will &lt;STRONG style="text-decoration: underline;"&gt;not&lt;/STRONG&gt; be created, while &lt;EM&gt;&lt;STRONG&gt;prompt&lt;/STRONG&gt;&lt;/EM&gt;_COUNT will always be created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; You can always open a track with Tech Support if you are having issues with a specific stored process and prompt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Oct 2013 18:43:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100734#M3698</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2013-10-05T18:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: Can I derive the libname from a Data Source or Data Source Item prompt output?</title>
      <link>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100735#M3699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Scott, as I am reading your questions they are not bases on technical questions but about generic concepts.&lt;/P&gt;&lt;P&gt;If that is correct than the TS direction is pointing into a dark labyrinth.&amp;nbsp; (Sorry Cynthia).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Most of what is existing today has a long evalutionary history.&amp;nbsp; SAS is existing since 1976. Within IT that as something of a pre-historic era.&lt;BR /&gt;There is much positive to say about that, but also implies, on first sight, some weird conventions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- The metadata approach is rather new with SAS and is still in a building up life-cycle. This approach is getting his power by the gui clickable building concept. DI Information map and far more to see with SAS-VA. &lt;A href="http://www.sas.com/software/visual-analytics/overview.html" title="http://www.sas.com/software/visual-analytics/overview.html"&gt; SAS&amp;amp;reg; Visual Analytics | SAS &lt;/A&gt;. The first steps to deliver web-based presentation was SAS/intrnet. Of SAS/intrnet you still can find the things like sessions in &lt;A href="http://support.sas.com/documentation/cdl/en/stpug/62758/HTML/default/viewer.htm#titlepage.htm" title="http://support.sas.com/documentation/cdl/en/stpug/62758/HTML/default/viewer.htm#titlepage.htm"&gt;SAS(R) 9.3 Stored Processes: Developer's Guide&lt;/A&gt;&lt;/P&gt;&lt;P&gt;-- The original SAS language&amp;nbsp; &lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/64801/HTML/default/viewer.htm#p1v9oa0j2oc7uon1q43zvoq66e0u.htm" title="http://support.sas.com/documentation/cdl/en/lrcon/64801/HTML/default/viewer.htm#p1v9oa0j2oc7uon1q43zvoq66e0u.htm"&gt;SAS(R) 9.4 Language Reference: Concepts&lt;/A&gt; is still there but is getting encapsulated with the newer metadata approach.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- With the sashelp.class you are using SAS in the old way as described by the language concepts. Using the DMS you can see a lot datasets catalogs and objects. -- Every type of object can be associated with different type of actions. This is how the Objected oriented approach was standardized. The object approach was on his top with SAS/AF and offering SCL (SAS componemt language), now more or less a forgotten part. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using Portal menu's (web-reports) is heavily relying on using the SAS-metadata. Moving away from the coding by hand and trying to build it up by generating that out of metadata. So in that approach you will see just metadata names. Not something users are used to as it his hiding the known physical locations. &lt;/P&gt;&lt;P&gt;The mix-up of those two can make is very confusing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Metadata is booming again as a generic approach. There are standards for that &lt;A href="http://en.wikipedia.org/wiki/Metadata_standards" title="http://en.wikipedia.org/wiki/Metadata_standards"&gt;Metadata standards - Wikipedia, the free encyclopedia&lt;/A&gt; and the CMW &lt;A href="http://www.omg.org/spec/" title="http://www.omg.org/spec/"&gt;OMG Formal Specifications&lt;/A&gt; one being used to have exchange options by different suppliers.&lt;/P&gt;&lt;P&gt;Metadata was originally dedicated to a DBA maintaining all definitions for a specific RDBMS I remember the IDD (Integrated Data Dictionar) of IDMS doing a lot of the same type of concepts as SAS metadata. Only 30 years older.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within the SAS-concepts you find a lot of limitatiions in the SAS language, eg:&lt;/P&gt;&lt;P&gt;- libnames / filenames limited length in the name of 8.&amp;nbsp; the old 8.8.8 namings and IO-controlblocks of System/360&lt;/P&gt;&lt;P&gt;- 32Kb length of variables. You have there the signed&amp;nbsp; 2 byte limitation. Being quite common in the years like commodore-64 machine.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Many high level languages like C and Java where almost everything is build are having those kind of limitations.&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Oct 2013 21:36:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100735#M3699</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2013-10-05T21:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: Can I derive the libname from a Data Source or Data Source Item prompt output?</title>
      <link>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100736#M3700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the replies so far.&amp;nbsp; Perhaps it will help to explain what I'm trying to do...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to develop a generic approach to creating an SQL query against a dataset using a stored process.&amp;nbsp; In most cases, it will be a straight query against a fact table.&amp;nbsp; In some instances, I will then join dimension data to the fact table subset using a hash object join.&amp;nbsp; For now, assume that the subsetting (where clause) only occurs against the fact table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In some instances, the end user will select the libref and dataset.&amp;nbsp; In others, I will simply set default values for these parameters, then make the prompts hidden.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, in the user interface (prompt manager), the end user selects:&amp;nbsp; the data source (libref and dataset) (FROM clause), desired output columns (SELECT clause), subset criteria (WHERE clause), and output sort order (ORDER BY clause - for now only ascending sort order is supported).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The best (albeit klunky) design I've been able to come up with so far is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;libref:&amp;nbsp; text, dynamic list, single value&lt;/P&gt;&lt;P&gt;dataset:&amp;nbsp; text, dynamic list, single value&lt;/P&gt;&lt;P&gt;columns:&amp;nbsp; text, dynamic list, multiple ordered values&lt;/P&gt;&lt;P&gt;filter name/value pairs (5):&amp;nbsp; name:&amp;nbsp; text, dynamic list, single value&amp;nbsp; value:&amp;nbsp; text, user enters values, multiple values&amp;nbsp; (5 pairs of prompts)&lt;/P&gt;&lt;P&gt;additional filtering:&amp;nbsp; text, user enters values, single value&lt;/P&gt;&lt;P&gt;order:&amp;nbsp; text, dynamic list, multiple ordered values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The dataset list is dependent on the libref selection, all downstream column selections are depended on libref and dataset selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The source dataset for the dynamic lists is SASHELP.VLIBNAM, SASHELP.VTABLE, and SASHELP.VCOLUMN.&amp;nbsp; I created the metadata for these tables by creating a pre-assigned library definition for SASHELP, then imported selected tables, writing the objects to \Shared Data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The user selects the desired libref, then the desired table, then the desired output columns.&amp;nbsp; For the filter, there are 5 "built-in" prompts where the user selects the desired variable, then enters the desired subsetting values.&amp;nbsp; Some of these variables have about 1.5 - 3M distinct values, so "Get Values" from a table simply won't perform in an acceptable manner - the user will have to type or paste the values into the prompt.&amp;nbsp; The variable data type is checked in the stored process, and the data is quoted as appropriate.&amp;nbsp; In almost all cases, 5 prompts (variables) are sufficient.&amp;nbsp; Otherwise, an advanced user can augment the filter (where clause) using the additional filtering prompt.&amp;nbsp; If 5 prompts is more than enough, I can simply hide the unnecessary prompts without having to change the underlying STP code.&amp;nbsp; If I want to "bind" a particular variable to a prompt, I can set a default value and either protect or hide the variable selection dropdown.&amp;nbsp; This approach (hopefully) allows flexibility for the end user and fast stored process development for the developer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This all works fine...EXCEPT it performs horribly.&amp;nbsp; Like 1-3 minutes for the prompt manager to display the UI.&amp;nbsp; So I tried making a "snapshot" of VLIBNAME, VTABLE, and VCOLUMN for a single library, but still got very poor performance.&amp;nbsp; My guess is all these dynamic, dependent prompts, plus having to query the workspace server, is the cause of the poor UI performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I switched to using the datasource and datasource item prompts.&amp;nbsp; Which performs great - it's reading from metadata instead of dynamic views on the workspace server - but these prompts IMO set really stupid values for the macro variables!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="63295" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) What I meant by "derive" is, can I use PROC METADATA or the metadata data step interfaces to derive the libref from a metadata table object, if I have the path to the object?&amp;nbsp; The SASHELP table metadata objects are in Shared Data only because I wrote them there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) I understand that DATASOURCE is the metadata location - that was in fact my point.&amp;nbsp; And I wasn't just "griping" - most (all?) of my stored processes are "old school" - I'm not doing much with say PROC METADATA, PROC STP, etc.&amp;nbsp; I truly don't understand whether any stored process developer, or stored process end user, would be interested in the metadata path over the libref.dataset name of the table object?&amp;nbsp; I'm only working with Tables, not say Information Maps.&amp;nbsp; Would the metadata path be of interest for an Information Map datasource?&amp;nbsp; If anyone can provide an example of a stored process where the metadata path is useful to the stored process, I'd love to see it; I'm sure I would learn something from the example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;quote&amp;gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;DATASOURCEITEM allows user to select data items from either tables&lt;/SPAN&gt;&amp;lt;/quote&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I disagree, since the DATASOURCEITEM does not contain sufficient information to derive the source libref and dataset.&amp;nbsp; If I have SASHELP.SHOES, SASUSER.SHOES, and SOMELIB.SHOES, which SHOES dataset did the end user select?&amp;nbsp; The generated macro variables don't give me that information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) I can't hide the DATASOURCEITEM GUI from the user, since I need it to be visible so they can select the desired columns.&amp;nbsp; What I want to suppress is the DATASOURCE path in the GUI, since it is of no interest (and in fact confusing) to my end users.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) IMO this is a bit short sighted.&amp;nbsp; Setting the available list of downstream DATASOURCEITEMS based on the selection of an upstream DATASOURCE is obvious, isn't it?&amp;nbsp; Surely R&amp;amp;D would get this???&amp;nbsp; We were doing this in SAS/AF for decades!&amp;nbsp; In DMS, select Tools --&amp;gt; Query to see what I mean!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5) OK, thanks, COLUMN0 is deprecated then, but still around due to legacy functionality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would open a TS track, but I think this is more of stating a desired use case and request for feedback from the community.&amp;nbsp; If others are in agreement I'll formalize this as an enhancement request (although IMO a few of these are not enhancements but design bugs worthy of a hotfix).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="8872" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand the evolutionary history of SAS, but the subject matter in this post is very recent code/functionality in SAS. Like I said, maybe I'm missing something, but I think the prompt macro variables should be returning the libref.tablename.columnname rather than a metadata path. I wonder if the prompt manager got much usability testing by end users before being released to the market?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 05:04:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100736#M3700</guid>
      <dc:creator>ScottBass</dc:creator>
      <dc:date>2013-10-09T05:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can I derive the libname from a Data Source or Data Source Item prompt output?</title>
      <link>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100737#M3701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This may help you when working with a data source prompt; I don't know of a similar macro to deal with data source items.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Usage Note 37386: New SAS Stored Process prompts in SAS 9.2: Data source and Data source item - Usage Example&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/37/386.html" title="http://support.sas.com/kb/37/386.html"&gt;http://support.sas.com/kb/37/386.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vince DelGobbo&lt;/P&gt;&lt;P&gt;SAS R&amp;amp;D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 14:30:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100737#M3701</guid>
      <dc:creator>Vince_SAS</dc:creator>
      <dc:date>2013-10-09T14:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can I derive the libname from a Data Source or Data Source Item prompt output?</title>
      <link>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100738#M3702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Scott,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On first sight you are trying to build a "query builder" is there a reason for that? &lt;/P&gt;&lt;P&gt;It is standard functionality in Eguide and AMO. With SAS-v8 SAS/intrnet there was a sample doing that.&amp;nbsp; If that is what you want to build, it should be possible. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;The old-days codings &lt;/P&gt;&lt;UL&gt;&lt;LI&gt; Counters/macros&lt;BR /&gt;The naming convention for automatic is as described. In that approach it is&amp;nbsp; easy to contruct do-loops in SAS macro-language.&lt;BR /&gt;By the way it is similar to REXX-language.&lt;/LI&gt;&lt;LI&gt;Using sashelp.vlibname vtable is terrible slow. It was already that slow in 8.2 . It is not advisable to use them when good response is needed. With SAS 9.4 “proc&lt;BR /&gt;delete”has got his revival &lt;A href="http://support.sas.com/resources/papers/proceedings13/022-2013.pdf"&gt;http://support.sas.com/resources/papers/proceedings13/022-2013.pdf&lt;/A&gt; . Proc datasets is already much better in performance than using sashelp.v- approach.&amp;nbsp; &lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;What are your options:&lt;/P&gt;&lt;P&gt;&amp;nbsp; - You could use a “libname _all_&amp;nbsp; list”&amp;nbsp; with redirect and “proc datasets” to improve speed.&lt;/P&gt;&lt;P&gt;&amp;nbsp; - you could set up less or more permanent libraries containing the libnames / tables information. It would make sense to use a alike structure as the sashelp.v- members&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; - If the expected tables are less or more stable you could make own copies of the sashelp.v- members in a sort of caching approach. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Using the prompting framework you can use table-input when those tables for the prompts are registered in the metadata. That is asking for a more stable table-layout describing them.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Using the prompting framework with table-input and having many app-servers or using to want a SP-server can give you some surprises. These are:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&amp;nbsp; The menu for prompting will open up always a WS-server even if your process has been associated with a SP-server or other logical-server.&lt;/LI&gt;&lt;LI&gt;When more app-servers are available for the user and libname, the prompting framework will not necessary use the same app-server as you have defined your&lt;BR /&gt;process to run. It will pick a technical first one in an internal invisible list.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;These kind of not logical, not documented behavior can make your solution unsolvable. Just in the case you access to one possible view it is reliable functioning.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;I classify this as a design/implementation failure although SAS won’t admit that.&amp;nbsp; Sorry Vince, I could not resist this opportunity, but I guessed you already expected that. The reference you have given before is a good one, of course...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jaap &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 05:44:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100738#M3702</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2013-10-10T05:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Can I derive the libname from a Data Source or Data Source Item prompt output?</title>
      <link>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100739#M3703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Scott (et al),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I agree with the main thrust of your point.&amp;nbsp; But I think it's because when it comes to BI, I'm still (after a year or so) straddlig the new metadata-centric approach and good old fashioned SAS.&amp;nbsp; It feels like a happy straddling for now, but I suspect maybe not for long...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While I'm happy writing stored processes, I tend to hand write the source code for them.&amp;nbsp; And in that code I rarely uses a metadata library.&amp;nbsp; I tend to use base engine libraries or whatever engine I need for a data source.&amp;nbsp; Many of my datasets are never registered in the metadata.&amp;nbsp; Some down sides of this approach are that I don't have all the security benefits of libraries/datasets defined in the metadata.&amp;nbsp; (But I'm okay with that, since I can still control access to the stored process itself, and I haven't been working with sensitive data).&amp;nbsp; And if one day we move servers, updating the metadata libraries won't point my stored process toward a new physical locations of the data. (But I'm okay cuz most of the locations/dataset names in my code are dynamically derived from macros or other project data).&amp;nbsp; But the BI framework is obviously centered around metadata.&amp;nbsp; With lots of benefits beyond the two I've mentioned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So as an old SAS school programmer, if I had a &amp;amp;data prompt, I (like you) would want a simple prompt to select a libname (or physical path), data set name, etc. Like SAS/AF or whatever.&amp;nbsp; And were I to have a problem like yours, I would likely approach it as you did.&amp;nbsp; (Except that sashelp.vcolumn is so big, I'd probably have a separate nightly job to make small datasets for these dynamic prompts).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But since the entire BI framework is about metadata, it's not surprising to me that when you use the data prompts, you get metadata information.&amp;nbsp; The BI approach is trying to get folks to do more with metadata, and less with libnames/data set names written in code.&amp;nbsp; See for example recent addition of metadata-bound libraries.&amp;nbsp; &lt;A href="http://www.notecolon.info/2012/11/note-metadata-bound-libraries.html"&gt;http://www.notecolon.info/2012/11/note-metadata-bound-libraries.html&lt;/A&gt;&amp;nbsp;&amp;nbsp; I guess the mantra from that perspective would be: more metadata usage means more security and easier server administration and easier usage for business analysts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for your request for an example where knowing metadata source path for a dataset would be useful to a stored process developer, I guess it depends on how the metadata paths are set up.&amp;nbsp; For example, if metadata paths were informative, such as Data/Dev/DataX vs Data/Prod/DataX, then I can see how I might want to know the metadata path for the dataset selected by a user, so that I could determine whether they are analyzing /Dev data or /Prod data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;--Q.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 12:57:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100739#M3703</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2013-10-10T12:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Can I derive the libname from a Data Source or Data Source Item prompt output?</title>
      <link>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100740#M3704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if this helps but you can query the dictionary.libnames table via proc sql, pathname is the variable containing the physical path of the assigned library.&amp;nbsp; There is a view in sashelp of this table sashelp.vlibnam you can query through data step.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 13:14:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100740#M3704</guid>
      <dc:creator>gtcox76</dc:creator>
      <dc:date>2013-10-10T13:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: Can I derive the libname from a Data Source or Data Source Item prompt output?</title>
      <link>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100741#M3705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Quentin, indeed you see al lot moving to metadata. But you assumption it is more easier for administration and better security is too optimistic. As metadatabound libraries are only SAS datalibraries you are missing a lot of information/data that is not part of that. Setting up a well defined host security cannot be ignored. This is documented by SAS in&amp;nbsp; the Security Admininstration Guide.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2013 19:22:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100741#M3705</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2013-10-11T19:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Can I derive the libname from a Data Source or Data Source Item prompt output?</title>
      <link>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100742#M3706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Agreed, Jaap.&amp;nbsp; It all starts with the host security.&amp;nbsp; I guess by "more security" from using metadata I was referring to more granular security.&amp;nbsp; Where for a single table you can (I think) limit access to certain variables and rows within that table.&amp;nbsp; Can't do that at the OS level.&amp;nbsp; And by "easier administation" I meant if e.g. all libnames are registered in metadata (not coding paths in libname statements), then an admin could switch host servers or whatever, and everything would magikally work after updating the metadata, without need to update code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as I said, I haven't actually played much with the metadata.&amp;nbsp; Being happy with the level of security and functionality I can get from my OS and base SAS / macros....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2013 19:36:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100742#M3706</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2013-10-11T19:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can I derive the libname from a Data Source or Data Source Item prompt output?</title>
      <link>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100743#M3707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very well stated Quentin.&lt;/P&gt;&lt;P&gt;I am seeing a lot of people obviously forgetting the basic of software architecture/engineering. The goal you described (metadata) is belonging to that. How to achieve that can also be done in the old way. You are knowing the goals. Wished more people did.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2013 19:43:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100743#M3707</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2013-10-11T19:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can I derive the libname from a Data Source or Data Source Item prompt output?</title>
      <link>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100744#M3708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A __default_attr="726767" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;While I'm happy writing stored processes, I tend to hand write the source code for them.&amp;nbsp; And in that code I rarely uses a metadata library.&amp;nbsp; I tend to use base engine libraries or whatever engine I need for a data source.&amp;nbsp; Many of my datasets are never registered in the metadata.&amp;nbsp; Some down sides of this approach are that I don't have all the security benefits of libraries/datasets defined in the metadata.&amp;nbsp; (But I'm okay with that, since I can still control access to the stored process itself, and I haven't been working with sensitive data).&amp;nbsp; And if one day we move servers, updating the metadata libraries won't point my stored process toward a new physical locations of the data. (But I'm okay cuz most of the locations/dataset names in my code are dynamically derived from macros or other project data).&amp;nbsp; But the BI framework is obviously centered around metadata.&amp;nbsp; With lots of benefits beyond the two I've mentioned.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;All our libraries are pre-assigned (no, I didn't come up with this policy).&amp;nbsp; And our batch jobs use the -metaautoresources "SASApp" option.&amp;nbsp; So, all our libraries are assigned, whether in EG (Workspace Server), Stored Process Server, or batch job.&amp;nbsp; We do use security to restrict access (allocation) to particular user groups.&amp;nbsp; I'm happy to use a metadata library allocation, i.e. the meta engine, but there is no need.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;So as an old SAS school programmer, if I had a &amp;amp;data prompt, I (like you) would want a simple prompt to select a libname (or physical path), data set name, etc. Like SAS/AF or whatever.&amp;nbsp; And were I to have a problem like yours, I would likely approach it as you did.&amp;nbsp; (Except that sashelp.vcolumn is so big, I'd probably have a separate nightly job to make small datasets for these dynamic prompts).&lt;/P&gt;
&lt;/PRE&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;I made a snapshot of sashelp.vcolumn for a single library.&amp;nbsp; It reduced the number of columns from say 40,000 to 4,000.&amp;nbsp; Still a lot, but filtering a list of 4,000 columns should be quite quick (depending on the server specs).&amp;nbsp; It still had very poor performance with respect to the initial GUI display.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;After the user has selected the datasource and datasource items, my STP code needs to know which datasource (SAS dataset) and datasource item (SAS dataset column) the user selected.&amp;nbsp; The default SAS macro variables created by the prompt manager does not provide this information (but it can be derived via Vince's macro).&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;But since the entire BI framework is about metadata, it's not surprising to me that when you use the data prompts, you get metadata information.&amp;nbsp; The BI approach is trying to get folks to do more with metadata, and less with libnames/data set names written in code.&amp;nbsp; See for example recent addition of metadata-bound libraries.&amp;nbsp; &lt;A class="jive-link-external-small" href="http://www.notecolon.info/2012/11/note-metadata-bound-libraries.html" style="font-style: inherit; font-family: inherit; color: #0e66ba;"&gt;http://www.notecolon.info/2012/11/note-metadata-bound-libraries.html&lt;/A&gt;&amp;nbsp;&amp;nbsp; I guess the mantra from that perspective would be: more metadata usage means more security and easier server administration and easier usage for business analysts.&lt;/P&gt;
&lt;/PRE&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Maybe.&amp;nbsp; I still assert that displaying the metadata path to the end-user via the baked-in GUI elements is not good, esp. without giving the STP developer the chance to hide the path.&amp;nbsp; I just want the user to pick a column!&amp;nbsp; S/he could care less about the path to the metadata table object.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;As for your request for an example where knowing metadata source path for a dataset would be useful to a stored process developer, I guess it depends on how the metadata paths are set up.&amp;nbsp; For example, if metadata paths were informative, such as Data/Dev/DataX vs Data/Prod/DataX, then I can see how I might want to know the metadata path for the dataset selected by a user, so that I could determine whether they are analyzing /Dev data or /Prod data.&lt;/P&gt;
&lt;/PRE&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Our metadata paths do show this information.&amp;nbsp; I still don't want to display the path to the end user.&amp;nbsp; The user will know the environment s/he has selected by the library from which they selected the datasource.&amp;nbsp; And the environment (Dev or Prod) is not dependent on the metadata path.&amp;nbsp; If I move the table objects to path foo and bar, it will still be Dev or Prod metadata.&amp;nbsp; So I don't like the idea of binding the environment to the metadata path.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 03:29:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100744#M3708</guid>
      <dc:creator>ScottBass</dc:creator>
      <dc:date>2013-10-14T03:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can I derive the libname from a Data Source or Data Source Item prompt output?</title>
      <link>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100745#M3709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As a quick aside, and drifting a bit off topic (hijacking my own thread &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt; )...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm certainly no security expert, esp. with respect to metadata, but:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) AFAIK, currently you CANNOT have a completely secure environment without host operating system security, i.e. NTFS permissions.&amp;nbsp; IOW, if someone can "connect" to the server, knows the physical path to the library, and the library and its contents have NTFS Everyone: Read permission, and the datasets don't have a password on them, then a knowledgeable end user can get access to the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) I can't help feeling that fine grained access control would be better implemented at a "lower level" than the metadata server, i.e. via the engine and dataset header.&amp;nbsp; Without too much detail:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* For each engine (eg. BASE, SPDE, etc), the engine determines whether the particular path can be allocated.&lt;/P&gt;&lt;P&gt;* For each dataset, the dataset header determines whether the table can be accessed, which columns can be seen, and which rows can be seen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps the engine and dataset headers communicate with the metadata server, or perhaps they read security information some other way, say some table that is updated via some GUI.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to see more fine grained security available in just an old-fashioned Base SAS install, without the need for O/S level security.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 03:52:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100745#M3709</guid>
      <dc:creator>ScottBass</dc:creator>
      <dc:date>2013-10-14T03:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: Can I derive the libname from a Data Source or Data Source Item prompt output?</title>
      <link>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100746#M3710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A __default_attr="8872" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;On first sight you are trying to build a "query builder" is there a reason for that?&lt;/P&gt;
&lt;P style="font-style: inherit; font-family: inherit;"&gt;It is standard functionality in Eguide and AMO. With SAS-v8 SAS/intrnet there was a sample doing that.&amp;nbsp; If that is what you want to build, it should be possible.&lt;/P&gt;



&lt;/PRE&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;I'm more than happy for a better way of doing what I'm trying to do...&lt;/P&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;We have 3 fact tables, the largest about 30M records.&amp;nbsp; The entire library is a SPDE library, with "appropriate indexes".&amp;nbsp; We have numerous dimension tables varying in size from 50 to 1M records, with the appropriate business and surrogate keys in the fact tables to join the dimension data.&amp;nbsp; Our server is of "moderate" specifications, not the fastest in the world, but not a dog either.&lt;/P&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;&lt;/P&gt;&lt;P style="font-family: inherit; font-style: inherit;"&gt;A query against the fact table, especially when using the "provider" variable (a particular variable with low cardinality) is surprisingly fast (5-10 seconds).&amp;nbsp; The end users are almost always interested in a particular provider.&amp;nbsp; A typical query will be "provider = '12345' and date=&amp;lt;year to date | month to date&amp;gt;".&lt;/P&gt;&lt;P style="font-family: inherit; font-style: inherit;"&gt;&lt;/P&gt;&lt;P style="font-family: inherit; font-style: inherit;"&gt;My end users need to get to the non-summarized, detail level data &lt;SPAN style="text-decoration: underline;"&gt;very fast&lt;/SPAN&gt;.&amp;nbsp; They also need the data in Excel for further processing, so I will be using AMO.&amp;nbsp; The end users are very smart, but not programmers, not the most SAS literate, and AMO rightly does not contain a query builder for this category of end user (runaway query), only the Filter and Sort functionality &lt;STRONG&gt;against a single table&lt;/STRONG&gt;.&lt;/P&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-family: inherit; font-style: inherit; font-size: 10pt; line-height: 1.5em;"&gt;If all they wanted to do was query the fact table, the built-in "Filter and Sort" capability of AMO would do fine.&amp;nbsp; But, they may want "provider = '12345' and date = &amp;lt;month to date&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: inherit; font-style: inherit; font-size: 10pt; line-height: 1.5em;"&gt;&lt;STRONG&gt;and state = 'NSW'"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit; font-style: inherit; font-size: 10pt; line-height: 1.5em;"&gt;.&amp;nbsp; In that scenario, I want to filter the fact table, then use a hash object join for the address dimension data, then use a subsetting IF for state = 'NSW'.&amp;nbsp; To do this, I will use a stored process (STP).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;Our end users often complain that our "canned" STP's either contain too many or too few pre-selected columns.&amp;nbsp; So, I want to give them the option to select their desired output columns.&lt;/P&gt;&lt;P style="font-family: inherit; font-style: inherit;"&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;I further would like the end user to be able to paste subsetting information into Excel cells (esp. the provider), then use VBA to set the STP prompt and refresh.&amp;nbsp; It's unfortunate that the VBA interface to AMO is so limited (only single value text prompts), but I may be able to use hidden prompts and some fancy parsing to work around this shortcoming.&lt;/P&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;Again, this needs to be &lt;SPAN style="text-decoration: underline;"&gt;&lt;EM&gt;&lt;STRONG&gt;FAST&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;, both in the user interface and in query execution.&amp;nbsp; We cannot create a completely joined fact and dimension uber-table (which would be fast); it will be too huge, take too long to build, and take too much disk space.&amp;nbsp; I can't use a view (which would be slow), as the where clause passed to the view does not take advantage of the indexes.&amp;nbsp; I need to generate the code on the fly for the best performance.&lt;/P&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-family: inherit; font-style: inherit; font-size: 10pt; line-height: 1.5em;"&gt;Ok, so with all that painful detail out of the way...if there is a better approach, I'm all ears.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P style="font-style: inherit; font-family: inherit;"&gt;The old-days codings&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Counters/macros&lt;BR /&gt;The naming convention for automatic is as described. In that approach it is&amp;nbsp; easy to contruct do-loops in SAS macro-language.&lt;BR /&gt;By the way it is similar to REXX-language.&lt;/LI&gt;
&lt;/UL&gt;



&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm quite familiar with macro programming.&amp;nbsp; In my previous post I had attached my current code - you can have a look at it if you wish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;Using sashelp.vlibname vtable is terrible slow. It was already that slow in 8.2 . It is not advisable to use them when good response is needed.&lt;/PRE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See my previous reply to Quentin.&amp;nbsp; Even with a small, static table, using data retrieved from the workspace or stored process server was really slow, vs. data retrieved from the metadata server (i.e. datasource and datasource item).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;With SAS 9.4 “proc delete”has got his revival &lt;A class="jive-link-external-small" href="http://support.sas.com/resources/papers/proceedings13/022-2013.pdf" style="font-style: inherit; font-family: inherit; color: #0e66ba;"&gt;http://support.sas.com/resources/papers/proceedings13/022-2013.pdf&lt;/A&gt; .&lt;/P&gt;



&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sure, but I'm not sure what this has to do with sashelp.v* tables slow performance???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;Proc datasets is already much better in performance than using sashelp.v- approach.&lt;/P&gt;



&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, I usually use PROC CONTENTS, but this won't work for the datasource for a dynamic text prompt, which displays BEFORE the stored process code runs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit; font-style: inherit; background-color: #ffffff;"&gt;What are your options:&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit; font-style: inherit; background-color: #ffffff;"&gt;&amp;nbsp; - You could use a “libname _all_&amp;nbsp; list”&amp;nbsp; with redirect and “proc datasets” to improve speed.&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit; font-style: inherit; background-color: #ffffff;"&gt;&amp;nbsp; - you could set up less or more permanent libraries containing the libnames / tables information.&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;It would make sense to use a alike structure as the sashelp.v- members &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; - If the expected tables are less or more stable you could make own copies of the sashelp.v- members in a sort of caching approach.&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;Using the prompting framework you can use table-input when those tables for the prompts are registered in the metadata. That is asking for a more stable table-layout describing them.&lt;/SPAN&gt;&lt;/P&gt;



&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;Only if I do this BEFORE the STP runs, not as part of the STP.&amp;nbsp; Which is OK, since the dataset attributes would rarely change.&amp;nbsp; But see previous reply to Quentin (as well as my second post) - this approach still ran slowly for me.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;Using the prompting framework with table-input and having many app-servers or using to want a SP-server can give you some surprises. These are:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&amp;nbsp; The menu for prompting will open up always a WS-server even if your process has been associated with a SP-server or other logical-server.&lt;/LI&gt;
&lt;/UL&gt;



&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hmmm, well that's a bummer.&amp;nbsp; Who designed that?&amp;nbsp; &lt;STRONG&gt;If I say I want my STP to run on the STP server&lt;/STRONG&gt;, why open a WS server?&amp;nbsp; This could be part of the reason for my poor performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;UL&gt;
&lt;LI&gt;When more app-servers are available for the user and libname, the prompting framework will not necessary use the same app-server as you have defined your&lt;BR /&gt;process to run. It will pick a technical first one in an internal invisible list.&lt;/LI&gt;
&lt;/UL&gt;



&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the info.&amp;nbsp; Not applicable in my case, but useful to know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P style="font-style: inherit; font-family: inherit;"&gt;These kind of not logical, not documented behavior can make your solution unsolvable.&lt;/P&gt;



&lt;/PRE&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;Yep...although I'm leaning toward the datasource and datasource item approach for UI performance reasons.&lt;/P&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P style="font-style: inherit; font-family: inherit;"&gt;Just in the case you access to one possible view it is reliable functioning.&lt;/P&gt;
&lt;P style="font-style: inherit; font-family: inherit;"&gt;I classify this as a design/implementation failure although SAS won’t admit that.&lt;/P&gt;



&lt;/PRE&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;I agree.&amp;nbsp; SAS R&amp;amp;D are incredibly brilliant but 1) I don't think they always see things from the end user perspective, 2) often do similar things in an inconsistent manner (see my reply to Vince), and 3) sometimes create solutions where you can work wonders...IF you can figure out the hoops to jump through to get there.&amp;nbsp; I believe some analyst reports ranking SAS as really useful, &lt;STRONG&gt;but difficult to use&lt;/STRONG&gt;, have some basis in fact (this from someone who has worked with SAS for 25+ years, and has based most of his career on SAS programming).&amp;nbsp; Perhaps it gives some of us job security &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-family: inherit; font-style: inherit; font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;&lt;SPAN style="font-family: inherit; font-style: inherit; font-size: 10pt; line-height: 1.5em;"&gt;Sorry Vince, I could not resist this opportunity, but I guessed you already expected that. The reference you have given before is a good one, of course...&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-family: inherit;"&gt;Vince's input was incredibly useful - see my reply&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 04:54:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100746#M3710</guid>
      <dc:creator>ScottBass</dc:creator>
      <dc:date>2013-10-14T04:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: Can I derive the libname from a Data Source or Data Source Item prompt output?</title>
      <link>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100747#M3711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A __default_attr="103668" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your reply.&amp;nbsp; I had a look at the Usage Note, then Googled "%metaauto", which led me to this useful SGF paper:&amp;nbsp; &lt;A href="http://support.sas.com/resources/papers/proceedings11/309-2011.pdf" title="http://support.sas.com/resources/papers/proceedings11/309-2011.pdf"&gt;http://support.sas.com/resources/papers/proceedings11/309-2011.pdf&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had a look at the %metaauto macro (C:\Program Files\SASHome\SASFoundation\9.3\core\sasmacro\metaauto.sas on my machine), as well as all the internal macros, esp. metadata_getDatafileFromPath.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this begs a few questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)&amp;nbsp; Why the difference between the generated metadata item path between a DATASOURCE and DATASOURCEITEM prompt???&amp;nbsp; (Note: my datasource prompt is named DATASOURCE; my datasourceitem prompt is named COLUMN).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A DATASOURCE prompt generates macro variables like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;DATASOURCE=&lt;STRONG&gt;/Shared Data/CLASS(Table)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;DATASOURCE_TYPE=1&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;while a DATASOURCEITEM prompt generates macro variables like:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;COLUMN1=Name&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;COLUMN_COUNT=5&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;COLUMN_PATH1=&lt;STRONG&gt;/Shared Data/CLASS&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;COLUMN_SOURCE_TYPE1=1&amp;nbsp; &lt;EM&gt;(a Table)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;COLUMN_TYPE1=1&amp;nbsp; &lt;EM&gt;(a Char variable)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;I'm guessing (pure conjecture) that (Table) is part of the metadata item path?&amp;nbsp; After all, I could have metadata objects CLASS(Table), CLASS(Cube), &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;CLASS(Infomap), &lt;/SPAN&gt;CLASS(OLAP Infomap) all stored in /Shared Data.&amp;nbsp; I'm assuming that (Table) is a bit analogous to a file extension, and that /Path/ObjectName(ObjectType) forms a complete path?&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Regardless of whether this is technically accurate, in reviewing the code for metadata_getDatafileFromPath:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; rc = metadata_pathobj('',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;amp;PATH",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pathtype,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pathid);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;only works for /Shared Data/Class&lt;STRONG&gt;(Table)&lt;/STRONG&gt;, NOT /Shared Data/Class.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, if &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;COLUMN_PATH1=&lt;/SPAN&gt;/Shared Data/CLASS is meant to be "the path to the metadata item object from which the datasourceitem is derived", then why specify an incomplete (as your macro states a "malformed") path???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Ok, that's likely someone else's code with the design bug.&amp;nbsp; But, if TYPE= is a &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;required&lt;/STRONG&gt;&lt;/SPAN&gt; parameter to your macro, then why don't you work around this design bug in the prompt manager code?&amp;nbsp; I would think something like this would work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: #A0C0FF;"&gt;%macro&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt; test(path=, type=);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;&amp;nbsp; %&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: teal; background: white;"&gt;* Strip leading and trailing spaces ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'SAS Monospace';"&gt;%let&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt; path=&lt;/SPAN&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'SAS Monospace';"&gt;%sysfunc&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;(strip(&amp;amp;path));&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;&amp;nbsp; %&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: teal; background: white;"&gt;* Folders can contain parentheses, so use defensive programming ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;&amp;nbsp; %&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: teal; background: white;"&gt;* Assume "#" is not in the path, otherwise use some other delimiter ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'SAS Monospace';"&gt;%let&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt; rx=&lt;/SPAN&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'SAS Monospace';"&gt;%sysfunc&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;(prxparse(#^(.*)(\(Table\)|\(Cube\)|\(InfoMap\))$#));&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'SAS Monospace';"&gt;%if&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'SAS Monospace';"&gt;%sysfunc&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;(prxmatch(&amp;amp;rx,&amp;amp;path)) &lt;/SPAN&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'SAS Monospace';"&gt;%then&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'SAS Monospace';"&gt;%let&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt; path=&lt;/SPAN&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'SAS Monospace';"&gt;%sysfunc&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;(prxposn(&amp;amp;rx,1,&amp;amp;path));&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'SAS Monospace';"&gt;%syscall&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt; prxfree(rx);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'SAS Monospace';"&gt;%if&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt; (&amp;amp;type eq &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: blue; background: white;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;) &lt;/SPAN&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'SAS Monospace';"&gt;%then&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'SAS Monospace';"&gt;%let&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt; path=&amp;amp;path(Table);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'SAS Monospace';"&gt;%else&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'SAS Monospace';"&gt;%if&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt; (&amp;amp;type eq &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: blue; background: white;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;) &lt;/SPAN&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'SAS Monospace';"&gt;%then&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'SAS Monospace';"&gt;%let&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt; path=&amp;amp;path(Cube);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'SAS Monospace';"&gt;%else&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'SAS Monospace';"&gt;%if&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt; (&amp;amp;type eq &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: blue; background: white;"&gt;4&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;) &lt;/SPAN&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'SAS Monospace';"&gt;%then&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'SAS Monospace';"&gt;%let&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt; path=&amp;amp;path(InfoMap);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'SAS Monospace';"&gt;%put&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt; &amp;amp;=path;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: #A0C0FF;"&gt;%mend&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;%&lt;STRONG&gt;&lt;EM&gt;test&lt;/EM&gt;&lt;/STRONG&gt;(path=/Shared Data/Class(Table),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: blue; background: white;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;%&lt;STRONG&gt;&lt;EM&gt;test&lt;/EM&gt;&lt;/STRONG&gt;(path=/Shared Data/Class(Cube),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: blue; background: white;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;%&lt;STRONG&gt;&lt;EM&gt;test&lt;/EM&gt;&lt;/STRONG&gt;(path=/Shared Data/Class(InfoMap),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: blue; background: white;"&gt;4&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;%&lt;STRONG&gt;&lt;EM&gt;test&lt;/EM&gt;&lt;/STRONG&gt;(path=/Shared Data/Class(Cube),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: blue; background: white;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;);&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: teal; background: white;"&gt;* note mismatch on (type) and type= ;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;%&lt;STRONG&gt;&lt;EM&gt;test&lt;/EM&gt;&lt;/STRONG&gt;(path=/Shared Data/Class,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: blue; background: white;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;%&lt;STRONG&gt;&lt;EM&gt;test&lt;/EM&gt;&lt;/STRONG&gt;(path=/Shared Data/Class,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: blue; background: white;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;%&lt;STRONG&gt;&lt;EM&gt;test&lt;/EM&gt;&lt;/STRONG&gt;(path=/Shared Data/Class,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: blue; background: white;"&gt;4&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;%&lt;STRONG&gt;&lt;EM&gt;test&lt;/EM&gt;&lt;/STRONG&gt;(path=/Funky/(Path) (With) (Table)/Class,type=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: blue; background: white;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: black; background: white;"&gt;);&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'SAS Monospace'; color: teal; background: white;"&gt;* yes, I created this folder using SMC! ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(We don't use OLAP or Information Maps, so I'm just guessing re: the (object type ) specification - edit as required)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) If code similar to the above was in the %metadata_getDatafileFromPath macro, then it would also work with DATASOURCEITEM prompts (although it would be better if the prompt manager design bug was fixed so you didn't have to).&amp;nbsp; Here is an example where I "wrap" your macro:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #A0C0FF;"&gt;%macro&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; my_metadata_getDatafileFromPath(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; path=,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; type=,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; outvar=,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; assignlib=N,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; showver=N,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; debug=&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; %&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;* Strip leading and trailing spaces ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%let&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; path=&lt;/SPAN&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%sysfunc&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;(strip(&amp;amp;path));&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; %&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;* Folders can contain parentheses, so use defensive programming ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; %&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;* Assume "#" is not in the path, otherwise use some other delimiter ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%let&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; rx=&lt;/SPAN&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%sysfunc&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;(prxparse(#^(.*)(\(Table\)|\(Cube\)|\(InfoMap\))$#));&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%if&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%sysfunc&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;(prxmatch(&amp;amp;rx,&amp;amp;path)) &lt;/SPAN&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%then&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%let&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; path=&lt;/SPAN&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%sysfunc&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;(prxposn(&amp;amp;rx,1,&amp;amp;path));&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%syscall&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; prxfree(rx);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%if&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; (&amp;amp;type eq &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;) &lt;/SPAN&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%then&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%let&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; path=&amp;amp;path(Table);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%else&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%if&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; (&amp;amp;type eq &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;) &lt;/SPAN&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%then&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%let&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; path=&amp;amp;path(Cube);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%else&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%if&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; (&amp;amp;type eq &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;4&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;) &lt;/SPAN&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%then&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%let&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; path=&amp;amp;path(InfoMap);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; %&lt;STRONG&gt;&lt;EM&gt;metadata_getDatafileFromPath&lt;/EM&gt;&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; path=&amp;amp;path, &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; type=&amp;amp;type, &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; outvar=&amp;amp;outvar, &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; assignlib=&amp;amp;assignlib, &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; showver=&amp;amp;showver, &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; debug=&amp;amp;debug&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; );&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #A0C0FF;"&gt;%mend&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #A0C0FF;"&gt;%macro&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;STRONG&gt;&lt;EM&gt;loop&lt;/EM&gt;&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%do&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; i=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;1&lt;/SPAN&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%to&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &amp;amp;column_count;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; %&lt;STRONG&gt;&lt;EM&gt;my_metadata_getDatafileFromPath&lt;/EM&gt;&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; path=&amp;amp;&amp;amp;COLUMN_PATH&amp;amp;i,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; type=&amp;amp;&amp;amp;COLUMN_SOURCE_TYPE&amp;amp;i,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; assignlib=n,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; outvar=COLUMN_TABLE&amp;amp;i, &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; debug=&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; );&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%put&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; COLUMN_TABLE&amp;amp;i=&amp;amp;&amp;amp;column_table&amp;amp;i;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;%end&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #A0C0FF;"&gt;%mend&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;%&lt;STRONG&gt;&lt;EM&gt;loop&lt;/EM&gt;&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Minor:&amp;nbsp; if debug=y means "debug", then debug=n should mean "don't debug".&amp;nbsp; IMO debug=&amp;lt;any non blank value&amp;gt; meaning "don't debug" is confusing, and I have to troll through the macro code to work it out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was a bit worried about the performance impact of having to call the macro, but it's really fast.&amp;nbsp; Your macro goes a long way to helping me solve my programming issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still wish:&amp;nbsp; 1) the source libname.dataset name were part of the macro variables created by the prompt manager, 2) I could hide the unwanted information from the datasource and datasourceitem user-interface components, and 3) I could create dynamic prompting, setting a dependency on datasourceitem on the upstream datasource selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suspect this isn't even your code, but perhaps you could pass my opinions to the appropriate persons...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 06:46:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100747#M3711</guid>
      <dc:creator>ScottBass</dc:creator>
      <dc:date>2013-10-14T06:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Can I derive the libname from a Data Source or Data Source Item prompt output?</title>
      <link>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100748#M3712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok Scott,&lt;BR /&gt;You described the question you are trying to solve very detailed and at the high level. &lt;/P&gt;&lt;P&gt;I can also see more of the differences we are thinking and the experiences we have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your target-group customers are using AMO and needing a query on fact/dimansion tables to the detailed records.&lt;BR /&gt;This is giving a lot of options on that level:&lt;/P&gt;&lt;P&gt;- Information map studio.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Defnine the joins as new views. This will work whenthe kind of views are stable. Normally the case with cubes/Olap. &lt;/P&gt;&lt;P&gt;- When you have installed the successor of ODBC that is OLDB that is the interface to cubes in Excel to SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp; This is separate cleint at the SAS installation.&lt;BR /&gt;- &lt;A href="http://support.sas.com/documentation/cdl/en/lestmtsref/65040/HTML/default/viewer.htm#n1kh25to5o0wmvn1o4n4hsl3yyww.htm" title="http://support.sas.com/documentation/cdl/en/lestmtsref/65040/HTML/default/viewer.htm#n1kh25to5o0wmvn1o4n4hsl3yyww.htm"&gt;SAS(R) 9.4 Statements: Reference&lt;/A&gt;&amp;nbsp; You could use a datastep view.&lt;/P&gt;&lt;P&gt;&amp;nbsp; This is a datastep as you are already using but the view is like a dataset but will be delayed to run until you access it.&lt;/P&gt;&lt;P&gt;&amp;nbsp; The idea is the same as information map studio.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Insising on dynamic prompts with SP-processes you have to split up the perfromace question. &lt;BR /&gt;1/ how long does it take for the drop-downs appear&lt;/P&gt;&lt;P&gt;2/ how long does the prosessing take.&amp;nbsp; (no comment for that I assume)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The proc delete reference is mentioning the performance disadvantage SAS&amp;nbsp; did with proc datasets and even more with the SAShelp.v approach.&lt;/P&gt;&lt;P&gt;They are first trying to get all information off all involved datasets into memory (a lot of io) thereaftere a selection is made by you.&lt;BR /&gt;This will happen every time you are using that, as nothing is cached.&lt;BR /&gt;For performance there is Always a trade off in IO memory and cpu. The goal is minimize IO wihtout stressing the other two.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So solve the IO missing cache to program that yourself. Make a copy of all information on regular schemes.&lt;/P&gt;&lt;P&gt;As you are using cubes that should no big challenge as building them is a far more heavy job to do. &lt;BR /&gt;The effect of the WS server is just checking and informing as a second time the WS should already be running.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Oct 2013 06:35:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100748#M3712</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2013-10-15T06:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Can I derive the libname from a Data Source or Data Source Item prompt output?</title>
      <link>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100749#M3713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;scott, Now your hi-jacked subject to security.&lt;/P&gt;&lt;P&gt;The best place to secure assets is at the assets themselfes. This is an open door sorry for that.&lt;BR /&gt;As most assets areon the OS-level, txt html rtf files are also assets the OS-security is mandatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OLAP/Cubes is failing to define the assets in a clear way. That is by design of cubes.&lt;BR /&gt;The cubes contain information you may and may not have access to. At the same time the higher aggreagation levels are allowed, this is a contradiction.&lt;/P&gt;&lt;P&gt;This contradiction trying to solve is a terrible challenge as it implies row-level security.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some RDBMS systems have the option of this granularity. The problem is that rowl-level security is dependent of content/value.&lt;/P&gt;&lt;P&gt;SAS has row-level security as a programmatical approach implemented. By that the original table must be protected to having no access by them in an other way.&lt;BR /&gt;SAS introduced metadata-bound libraries. trying to force metadatacontrols.&amp;nbsp; Stlli when the original table can be copied it could be decrypted.&lt;/P&gt;&lt;P&gt;It is bad seurity as based on not knowing how it works and very small limited user base, so&amp;nbsp; bad guys are not interested. Same applies for the pwencode promotion. As SAS is trying to fulfill programmer requests without thorougly thinking and design they are easily doing a bad security job.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Oct 2013 11:20:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Can-I-derive-the-libname-from-a-Data-Source-or-Data-Source-Item/m-p/100749#M3713</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2013-10-15T11:20:45Z</dc:date>
    </item>
  </channel>
</rss>

