<?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: How to use a prompt in a LIBNAME statement ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-a-prompt-in-a-LIBNAME-statement/m-p/83336#M17985</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh yes ! It works !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you both !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just for a better understanding, could you please explain to me quickly the difference between single and double quotes ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Sep 2013 13:19:50 GMT</pubDate>
    <dc:creator>GuiVtzl</dc:creator>
    <dc:date>2013-09-16T13:19:50Z</dc:date>
    <item>
      <title>How to use a prompt in a LIBNAME statement ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-a-prompt-in-a-LIBNAME-statement/m-p/83331#M17980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been tyring to use a prompt in a LIBNAME statement, but I can't make it work. Could you help me please ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's my code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIBNAME TRAVAIL 'C:\SAS_TEST\&amp;amp;User';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use a prompt to create a macrovariable "User" which can take names such as Guillaume, John, Mike etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Sep 2013 09:39:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-a-prompt-in-a-LIBNAME-statement/m-p/83331#M17980</guid>
      <dc:creator>GuiVtzl</dc:creator>
      <dc:date>2013-09-16T09:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a prompt in a LIBNAME statement ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-a-prompt-in-a-LIBNAME-statement/m-p/83332#M17981</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;From your description it seems that you have created a prompt using SAS Enterprise Guide and have a program where you are using the underlying macro variable from the prompt but it isn't resolving. Is this correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that you may have missed the additional step of associating the prompt with your program. The steps (taken from the online SAS Enterprise Guide help) are as follows:&lt;/P&gt;&lt;P&gt;---&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;To associate an existing prompt with a program &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Open the program item in which you want to use a prompt and click &lt;STRONG&gt;Properties&lt;/STRONG&gt; on the workspace toolbar. The Properties for &lt;EM&gt;program-name&lt;/EM&gt; window opens. (&lt;STRONG&gt;Note&lt;/STRONG&gt;: You can also right-click the program item in the project tree or process flow and select &lt;STRONG&gt;Properties&lt;/STRONG&gt;.) &lt;/LI&gt;&lt;LI&gt;Click &lt;STRONG&gt;Prompts&lt;/STRONG&gt; in the selection pane, and then click &lt;STRONG&gt;Add&lt;/STRONG&gt;. The Select Prompts dialog box opens. &lt;/LI&gt;&lt;LI&gt;Select the prompt that you want to associate with the program item and click &lt;STRONG&gt;OK&lt;/STRONG&gt;. &lt;/LI&gt;&lt;LI&gt;Click &lt;STRONG&gt;OK&lt;/STRONG&gt; to close the Properties dialog box. &lt;/LI&gt;&lt;LI&gt;Edit the program file in which you want to use a prompt. The prompt should be added to the code as &lt;EM&gt;&amp;amp;prompt-name&lt;/EM&gt;. &lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You seem to have done the last bullet point above... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Michelle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Sep 2013 12:31:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-a-prompt-in-a-LIBNAME-statement/m-p/83332#M17981</guid>
      <dc:creator>MichelleHomes</dc:creator>
      <dc:date>2013-09-16T12:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a prompt in a LIBNAME statement ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-a-prompt-in-a-LIBNAME-statement/m-p/83333#M17982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Michelle, thanks for your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Indeed I'm using EG. In fact, I added the prompt to the program, I think that is a syntax problem I am facing here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I used the code above, I've got this error in the log :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;/* Importation de la K_REPORTING. Constitution des INPUTS #1 */&lt;/P&gt;&lt;P&gt;24&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LIBNAME TRAVAIL 'C:\SAS_TEST\&amp;amp;User.';&amp;nbsp; "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In fact it does not even resolve the prompt with the value I entered (which is Guillaume)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Then I tried this code (The error seems to be with the quotation marks, I don't know what syntax to use to correctly write the path to the library with my prompt):&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIBNAME TRAVAIL 'C:\SAS_TEST\'&amp;amp;User.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Importation de la K_REPORTING. Constitution des INPUTS #1 */&lt;/P&gt;&lt;P&gt;24&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LIBNAME TRAVAIL 'C:\SAS_TEST\'&amp;amp;User.;&lt;/P&gt;&lt;P&gt;NOTE: Line generated by the macro variable "USER".&lt;/P&gt;&lt;P&gt;24&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'C:\SAS_TEST\'Guillaume&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; _______________________&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; 49&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 22&lt;/P&gt;&lt;P&gt;ERROR: Nom TRAVAIL non attribué.&lt;/P&gt;&lt;P&gt;ERROR: Error in the LIBNAME statement.&lt;/P&gt;&lt;P&gt;NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. &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; Inserting white space between a quoted string and the succeeding identifier is &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; recommended.&lt;/P&gt;&lt;P&gt;ERROR 22-7: Nom d'option GUILLAUME incorrect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Sep 2013 12:47:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-a-prompt-in-a-LIBNAME-statement/m-p/83333#M17982</guid>
      <dc:creator>GuiVtzl</dc:creator>
      <dc:date>2013-09-16T12:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a prompt in a LIBNAME statement ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-a-prompt-in-a-LIBNAME-statement/m-p/83334#M17983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;G.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you tried double quotes around the libname path?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LIBNAME TRAVAIL &lt;STRONG&gt;"&lt;/STRONG&gt;C:\SAS_TEST\&amp;amp;User&lt;STRONG&gt;"&lt;/STRONG&gt;;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I haven't tried it in EG, but if I use the original code in base SAS, I'm told the library doesn't exist.&amp;nbsp; If I use the double quotes, it resolves and creates the library.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck,&lt;/P&gt;&lt;P&gt;Blake&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Sep 2013 12:53:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-a-prompt-in-a-LIBNAME-statement/m-p/83334#M17983</guid>
      <dc:creator>bsanders</dc:creator>
      <dc:date>2013-09-16T12:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a prompt in a LIBNAME statement ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-a-prompt-in-a-LIBNAME-statement/m-p/83335#M17984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to have double quotes around the path. The macro compiler will not resolve a macro variable within single quotes as it is treated as a literal. The text is then passed to the SAS compiler and it fails as it is incorrect SAS code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIBNAME TRAVAIL "C:\SAS_TEST\&amp;amp;User";&lt;/P&gt;&lt;P&gt;will resolve correctly and the SAS code will be valid as long as the macro variable value is correct and the folder exists.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Sep 2013 13:10:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-a-prompt-in-a-LIBNAME-statement/m-p/83335#M17984</guid>
      <dc:creator>MichelleHomes</dc:creator>
      <dc:date>2013-09-16T13:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a prompt in a LIBNAME statement ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-a-prompt-in-a-LIBNAME-statement/m-p/83336#M17985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh yes ! It works !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you both !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just for a better understanding, could you please explain to me quickly the difference between single and double quotes ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Sep 2013 13:19:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-a-prompt-in-a-LIBNAME-statement/m-p/83336#M17985</guid>
      <dc:creator>GuiVtzl</dc:creator>
      <dc:date>2013-09-16T13:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a prompt in a LIBNAME statement ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-a-prompt-in-a-LIBNAME-statement/m-p/83337#M17986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is a fundamental of macro processing. The macro reference guide contains detail information, &lt;SPAN style="color: #000000; font-family: '.HelveticaNeueUI'; font-size: 15px; text-align: -webkit-auto;"&gt;&lt;A class="jive-link-external-small" href="http://support.sas.com/documentation/cdl/en/mcrolref/64754/HTML/default/viewer.htm#n1nks63d6g1rk2n1owajhi374c6w.htm"&gt;http://support.sas.com/documentation/cdl/en/mcrolref/64754/HTML/default/viewer.htm#n1nks63d6g1rk2n1owajhi374c6w.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the question has been answered to your satisfaction please mark it as answered.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Sep 2013 19:22:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-a-prompt-in-a-LIBNAME-statement/m-p/83337#M17986</guid>
      <dc:creator>MichelleHomes</dc:creator>
      <dc:date>2013-09-16T19:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a prompt in a LIBNAME statement ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-a-prompt-in-a-LIBNAME-statement/m-p/83338#M17987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot for your help and enlightment !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 09:42:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-a-prompt-in-a-LIBNAME-statement/m-p/83338#M17987</guid>
      <dc:creator>GuiVtzl</dc:creator>
      <dc:date>2013-09-19T09:42:32Z</dc:date>
    </item>
  </channel>
</rss>

