<?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: EG prompt not working in where= data set option in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-prompt-not-working-in-where-data-set-option/m-p/710166#M37957</link>
    <description>FreelanceReinhard - I'm so grateful!</description>
    <pubDate>Fri, 08 Jan 2021 14:15:40 GMT</pubDate>
    <dc:creator>Multipla99</dc:creator>
    <dc:date>2021-01-08T14:15:40Z</dc:date>
    <item>
      <title>EG prompt not working in where= data set option</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-prompt-not-working-in-where-data-set-option/m-p/709827#M37938</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm quite new to EG and thought I could use generated prompts as I use macro variabels in SAS DMS. This seems however not always work. Can someone please explain why i don't succed with the code below? (I have tested both in EG 7.15 and EG 8.2)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data prompttest;&lt;BR /&gt;set sashelp.class&lt;BR /&gt;(where=(&amp;amp;promptselection));&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Value of &amp;amp;promptselection&lt;/STRONG&gt;: upcase(Name) = 'ALFRED' or upcase(SEX) = 'F'&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;From log:&amp;nbsp;&lt;/STRONG&gt;ERROR 6-185: Missing ')' parenthesis for data set option list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;amp;Promptselection is generated with Prompt Manager.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;General tab: &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Name =&amp;nbsp;Promptselection,&lt;/P&gt;&lt;P&gt;Options ticked: "Requires a non-blank value" and "Use prompt value throughtout project".&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Prompt Type and Values tab:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Prompt type = Text, Method for populating prompt = "User selects value from a static list", Number of values = "Single value",&lt;/P&gt;&lt;P&gt;List of values&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Unformatted value&lt;/TD&gt;&lt;TD&gt;Formattade displayed value&lt;/TD&gt;&lt;TD&gt;Default&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;upcase(Name) = 'ALFRED' or upcase(SEX) = 'F'&lt;/TD&gt;&lt;TD&gt;Alfred + girls&lt;/TD&gt;&lt;TD&gt;*&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;upcase(Name) = 'ALFRED'&lt;/TD&gt;&lt;TD&gt;Alfred&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 06:50:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-prompt-not-working-in-where-data-set-option/m-p/709827#M37938</guid>
      <dc:creator>Multipla99</dc:creator>
      <dc:date>2021-01-07T06:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: EG prompt not working in where= data set option</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-prompt-not-working-in-where-data-set-option/m-p/709901#M37947</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13363"&gt;@Multipla99&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Normally I don't use SAS Enterprise Guide, but I've just started a session in order to replicate your issue. The log contains the following %LET statement among other stuff SAS EG likes to add to the user's code:&lt;/P&gt;
&lt;PRE&gt;%LET Promptselection = upcase(Name) = %nrstr(%')ALFRED%nrstr(%') or upcase(SEX) = %nrstr(%')F%nrstr(%');&lt;/PRE&gt;
&lt;P&gt;So, SAS EG also did some (unauthorized) macro quoting and thus replaced the innocuous single quotes in your code with a bizarre triple of control characters: '011102'x. These are, of course, indigestible for the compiler later on, hence the error messages.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use the %UNQUOTE function to undo the macro quoting:&lt;/P&gt;
&lt;PRE&gt;&lt;FONT size="4"&gt;data prompttest;
set sashelp.class(where=(&lt;STRONG&gt;&lt;FONT color="#3366FF"&gt;%unquote(&lt;/FONT&gt;&lt;/STRONG&gt;&amp;amp;promptselection&lt;STRONG&gt;&lt;FONT color="#3366FF"&gt;)&lt;/FONT&gt;&lt;/STRONG&gt;));
run;&lt;/FONT&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Jan 2021 13:39:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-prompt-not-working-in-where-data-set-option/m-p/709901#M37947</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-01-07T13:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: EG prompt not working in where= data set option</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-prompt-not-working-in-where-data-set-option/m-p/710166#M37957</link>
      <description>FreelanceReinhard - I'm so grateful!</description>
      <pubDate>Fri, 08 Jan 2021 14:15:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-prompt-not-working-in-where-data-set-option/m-p/710166#M37957</guid>
      <dc:creator>Multipla99</dc:creator>
      <dc:date>2021-01-08T14:15:40Z</dc:date>
    </item>
  </channel>
</rss>

