<?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 modify values from a prompt in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-modify-values-from-a-prompt/m-p/792182#M253819</link>
    <description>&lt;P&gt;Probably the easiest way would be to make a new variable in your source data which has only the middle 6 digits, and ask users to only enter the middle six digits as the prompt value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The harder way would be to allow users to enter the full 11 digits, and have your code select select the middle 6 digits and use that for the WHERE subsetting.&amp;nbsp; Selecting the middle 6 digits should be easy, but adapting %_eg_whereParam may be hard just cuz it's a lot of code. And I'm not sure if EG would even let you create your own version of the macro.&amp;nbsp; If you're comfortable programming, you might be better off writing your own (simpler) macro to use on the WHERE statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it helps, here's the definition of %_eg_whereParam&amp;nbsp; that I see (it may evolve over versions):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro _eg_WhereParam( COLUMN, PARM, OPERATOR, TYPE=S, MATCHALL=_ALL_VALUES_, MATCHALL_CLAUSE=1, MAX= , IS_EXPLICIT=0, MATCH_CASE=1);

  %local q1 q2 sq1 sq2;
  %local isEmpty;
  %local isEqual isNotEqual;
  %local isIn isNotIn;
  %local isString;
  %local isBetween;

  %let isEqual = ("%QUPCASE(&amp;amp;OPERATOR)" = "EQ" OR "&amp;amp;OPERATOR" = "=");
  %let isNotEqual = ("%QUPCASE(&amp;amp;OPERATOR)" = "NE" OR "&amp;amp;OPERATOR" = "&amp;lt;&amp;gt;");
  %let isIn = ("%QUPCASE(&amp;amp;OPERATOR)" = "IN");
  %let isNotIn = ("%QUPCASE(&amp;amp;OPERATOR)" = "NOT IN");
  %let isString = (%QUPCASE(&amp;amp;TYPE) eq S or %QUPCASE(&amp;amp;TYPE) eq STRING );
  %if &amp;amp;isString %then
  %do;
	%if "&amp;amp;MATCH_CASE" eq "0" %then %do;
		%let COLUMN = %str(UPPER%(&amp;amp;COLUMN%));
	%end;
	%let q1=%str(%");
	%let q2=%str(%");
	%let sq1=%str(%'); 
	%let sq2=%str(%'); 
  %end;
  %else %if %QUPCASE(&amp;amp;TYPE) eq D or %QUPCASE(&amp;amp;TYPE) eq DATE %then 
  %do;
    %let q1=%str(%");
    %let q2=%str(%"d);
	%let sq1=%str(%'); 
    %let sq2=%str(%'); 
  %end;
  %else %if %QUPCASE(&amp;amp;TYPE) eq T or %QUPCASE(&amp;amp;TYPE) eq TIME %then
  %do;
    %let q1=%str(%");
    %let q2=%str(%"t);
	%let sq1=%str(%'); 
    %let sq2=%str(%'); 
  %end;
  %else %if %QUPCASE(&amp;amp;TYPE) eq DT or %QUPCASE(&amp;amp;TYPE) eq DATETIME %then
  %do;
    %let q1=%str(%");
    %let q2=%str(%"dt);
	%let sq1=%str(%'); 
    %let sq2=%str(%'); 
  %end;
  %else
  %do;
    %let q1=;
    %let q2=;
	%let sq1=;
    %let sq2=;
  %end;
  
  %if "&amp;amp;PARM" = "" %then %let PARM=&amp;amp;COLUMN;

  %let isBetween = ("%QUPCASE(&amp;amp;OPERATOR)"="BETWEEN" or "%QUPCASE(&amp;amp;OPERATOR)"="NOT BETWEEN");

  %if "&amp;amp;MAX" = "" %then %do;
    %let MAX = &amp;amp;parm._MAX;
    %if &amp;amp;isBetween %then %let PARM = &amp;amp;parm._MIN;
  %end;

  %if not %symexist(&amp;amp;PARM) or (&amp;amp;isBetween and not %symexist(&amp;amp;MAX)) %then %do;
    %if &amp;amp;IS_EXPLICIT=0 %then %do;
		not &amp;amp;MATCHALL_CLAUSE
	%end;
	%else %do;
	    not 1=1
	%end;
  %end;
  %else %if "%qupcase(&amp;amp;&amp;amp;&amp;amp;PARM)" = "%qupcase(&amp;amp;MATCHALL)" %then %do;
    %if &amp;amp;IS_EXPLICIT=0 %then %do;
	    &amp;amp;MATCHALL_CLAUSE
	%end;
	%else %do;
	    1=1
	%end;	
  %end;
  %else %if (not %symexist(&amp;amp;PARM._count)) or &amp;amp;isBetween %then %do;
    %let isEmpty = ("&amp;amp;&amp;amp;&amp;amp;PARM" = "");
    %if (&amp;amp;isEqual AND &amp;amp;isEmpty AND &amp;amp;isString) %then
       &amp;amp;COLUMN is null;
    %else %if (&amp;amp;isNotEqual AND &amp;amp;isEmpty AND &amp;amp;isString) %then
       &amp;amp;COLUMN is not null;
    %else %do;
	   %if &amp;amp;IS_EXPLICIT=0 %then %do;
           &amp;amp;COLUMN &amp;amp;OPERATOR 
			%if "&amp;amp;MATCH_CASE" eq "0" %then %do;
				%unquote(&amp;amp;q1)%QUPCASE(&amp;amp;&amp;amp;&amp;amp;PARM)%unquote(&amp;amp;q2)
			%end;
			%else %do;
				%unquote(&amp;amp;q1)&amp;amp;&amp;amp;&amp;amp;PARM%unquote(&amp;amp;q2)
			%end;
	   %end;
	   %else %do;
	       &amp;amp;COLUMN &amp;amp;OPERATOR 
			%if "&amp;amp;MATCH_CASE" eq "0" %then %do;
				%unquote(%nrstr(&amp;amp;sq1))%QUPCASE(&amp;amp;&amp;amp;&amp;amp;PARM)%unquote(%nrstr(&amp;amp;sq2))
			%end;
			%else %do;
				%unquote(%nrstr(&amp;amp;sq1))&amp;amp;&amp;amp;&amp;amp;PARM%unquote(%nrstr(&amp;amp;sq2))
			%end;
	   %end;
       %if &amp;amp;isBetween %then 
          AND %unquote(&amp;amp;q1)&amp;amp;&amp;amp;&amp;amp;MAX%unquote(&amp;amp;q2);
    %end;
  %end;
  %else 
  %do;
	%local emptyList;
  	%let emptyList = %symexist(&amp;amp;PARM._count);
  	%if &amp;amp;emptyList %then %let emptyList = &amp;amp;&amp;amp;&amp;amp;PARM._count = 0;
	%if (&amp;amp;emptyList) %then
	%do;
		%if (&amp;amp;isNotin) %then
		   1;
		%else
			0;
	%end;
	%else %if (&amp;amp;&amp;amp;&amp;amp;PARM._count = 1) %then 
    %do;
      %let isEmpty = ("&amp;amp;&amp;amp;&amp;amp;PARM" = "");
      %if (&amp;amp;isIn AND &amp;amp;isEmpty AND &amp;amp;isString) %then
        &amp;amp;COLUMN is null;
      %else %if (&amp;amp;isNotin AND &amp;amp;isEmpty AND &amp;amp;isString) %then
        &amp;amp;COLUMN is not null;
      %else %do;
	    %if &amp;amp;IS_EXPLICIT=0 %then %do;
			%if "&amp;amp;MATCH_CASE" eq "0" %then %do;
				&amp;amp;COLUMN &amp;amp;OPERATOR (%unquote(&amp;amp;q1)%QUPCASE(&amp;amp;&amp;amp;&amp;amp;PARM)%unquote(&amp;amp;q2))
			%end;
			%else %do;
				&amp;amp;COLUMN &amp;amp;OPERATOR (%unquote(&amp;amp;q1)&amp;amp;&amp;amp;&amp;amp;PARM%unquote(&amp;amp;q2))
			%end;
	    %end;
		%else %do;
		    &amp;amp;COLUMN &amp;amp;OPERATOR (
			%if "&amp;amp;MATCH_CASE" eq "0" %then %do;
				%unquote(%nrstr(&amp;amp;sq1))%QUPCASE(&amp;amp;&amp;amp;&amp;amp;PARM)%unquote(%nrstr(&amp;amp;sq2)))
			%end;
			%else %do;
				%unquote(%nrstr(&amp;amp;sq1))&amp;amp;&amp;amp;&amp;amp;PARM%unquote(%nrstr(&amp;amp;sq2)))
			%end;
		%end;
	  %end;
    %end;
    %else 
    %do;
       %local addIsNull addIsNotNull addComma;
       %let addIsNull = %eval(0);
       %let addIsNotNull = %eval(0);
       %let addComma = %eval(0);
       (&amp;amp;COLUMN &amp;amp;OPERATOR ( 
       %do i=1 %to &amp;amp;&amp;amp;&amp;amp;PARM._count; 
          %let isEmpty = ("&amp;amp;&amp;amp;&amp;amp;PARM&amp;amp;i" = "");
          %if (&amp;amp;isString AND &amp;amp;isEmpty AND (&amp;amp;isIn OR &amp;amp;isNotIn)) %then
          %do;
             %if (&amp;amp;isIn) %then %let addIsNull = 1;
             %else %let addIsNotNull = 1;
          %end;
          %else
          %do;		     
            %if &amp;amp;addComma %then %do;,%end;
			%if &amp;amp;IS_EXPLICIT=0 %then %do;
				%if "&amp;amp;MATCH_CASE" eq "0" %then %do;
					%unquote(&amp;amp;q1)%QUPCASE(&amp;amp;&amp;amp;&amp;amp;PARM&amp;amp;i)%unquote(&amp;amp;q2)
				%end;
				%else %do;
					%unquote(&amp;amp;q1)&amp;amp;&amp;amp;&amp;amp;PARM&amp;amp;i%unquote(&amp;amp;q2)
				%end;
			%end;
			%else %do;
				%if "&amp;amp;MATCH_CASE" eq "0" %then %do;
					%unquote(%nrstr(&amp;amp;sq1))%QUPCASE(&amp;amp;&amp;amp;&amp;amp;PARM&amp;amp;i)%unquote(%nrstr(&amp;amp;sq2))
				%end;
				%else %do;
					%unquote(%nrstr(&amp;amp;sq1))&amp;amp;&amp;amp;&amp;amp;PARM&amp;amp;i%unquote(%nrstr(&amp;amp;sq2))
				%end; 
			%end;
            %let addComma = %eval(1);
          %end;
       %end;) 
       %if &amp;amp;addIsNull %then OR &amp;amp;COLUMN is null;
       %else %if &amp;amp;addIsNotNull %then AND &amp;amp;COLUMN is not null;
       %do;)
       %end;
    %end;
  %end;
%mend _eg_WhereParam;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 25 Jan 2022 14:29:23 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2022-01-25T14:29:23Z</dc:date>
    <item>
      <title>How to modify values from a prompt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-modify-values-from-a-prompt/m-p/792166#M253813</link>
      <description>&lt;P&gt;I have a prompt in Enterprise Guide where user adds document numbers.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="cpf.gif" style="width: 703px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67754i4B944083EB8F9E7B/image-size/large?v=v2&amp;amp;px=999" role="button" title="cpf.gif" alt="cpf.gif" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I use these values in a query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;WHERE %_eg_WhereParam( t1.DSC_CPF_CNPJ_SANCIONADO, CPF, IN, TYPE=S, IS_EXPLICIT=0 )&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The table I look up sometimes has the information "masked" so instead of having the information like 11122233344 I have ***222333**.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How can I change prompt values to do masked search?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 12:57:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-modify-values-from-a-prompt/m-p/792166#M253813</guid>
      <dc:creator>fabiopjr</dc:creator>
      <dc:date>2022-01-25T12:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify values from a prompt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-modify-values-from-a-prompt/m-p/792177#M253817</link>
      <description>&lt;P&gt;What is it that you want to happen?&lt;BR /&gt;Do you want the user to enter&amp;nbsp;&lt;SPAN&gt;***222333** instead of&amp;nbsp;11122233344?&amp;nbsp; Does the "prompt" allow that?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Do you want the user to enter&amp;nbsp;222333 and allow it to consider that a match for&amp;nbsp;***222333** or&amp;nbsp;11122233344 or&amp;nbsp;&amp;nbsp;99922233388?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Do you want the user to enter&amp;nbsp;11122233344 and allow that to match either&amp;nbsp;11122233344 or&amp;nbsp;***222333**?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Do you have the definition of the macro you calling?&amp;nbsp;From its name it looks like it is probably something that Enterprise Guide has created and submitted the source code to SAS to compile when you started your SAS session.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 13:41:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-modify-values-from-a-prompt/m-p/792177#M253817</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-01-25T13:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify values from a prompt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-modify-values-from-a-prompt/m-p/792178#M253818</link>
      <description>&lt;P&gt;&lt;SPAN&gt;"Do you want the user to enter&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;***222333** instead of&amp;nbsp;11122233344?&amp;nbsp; Does the "prompt" allow that?"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the current solution.&amp;nbsp;I wanted to avoid this and lessen the likelihood of errors.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 13:47:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-modify-values-from-a-prompt/m-p/792178#M253818</guid>
      <dc:creator>fabiopjr</dc:creator>
      <dc:date>2022-01-25T13:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify values from a prompt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-modify-values-from-a-prompt/m-p/792182#M253819</link>
      <description>&lt;P&gt;Probably the easiest way would be to make a new variable in your source data which has only the middle 6 digits, and ask users to only enter the middle six digits as the prompt value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The harder way would be to allow users to enter the full 11 digits, and have your code select select the middle 6 digits and use that for the WHERE subsetting.&amp;nbsp; Selecting the middle 6 digits should be easy, but adapting %_eg_whereParam may be hard just cuz it's a lot of code. And I'm not sure if EG would even let you create your own version of the macro.&amp;nbsp; If you're comfortable programming, you might be better off writing your own (simpler) macro to use on the WHERE statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it helps, here's the definition of %_eg_whereParam&amp;nbsp; that I see (it may evolve over versions):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro _eg_WhereParam( COLUMN, PARM, OPERATOR, TYPE=S, MATCHALL=_ALL_VALUES_, MATCHALL_CLAUSE=1, MAX= , IS_EXPLICIT=0, MATCH_CASE=1);

  %local q1 q2 sq1 sq2;
  %local isEmpty;
  %local isEqual isNotEqual;
  %local isIn isNotIn;
  %local isString;
  %local isBetween;

  %let isEqual = ("%QUPCASE(&amp;amp;OPERATOR)" = "EQ" OR "&amp;amp;OPERATOR" = "=");
  %let isNotEqual = ("%QUPCASE(&amp;amp;OPERATOR)" = "NE" OR "&amp;amp;OPERATOR" = "&amp;lt;&amp;gt;");
  %let isIn = ("%QUPCASE(&amp;amp;OPERATOR)" = "IN");
  %let isNotIn = ("%QUPCASE(&amp;amp;OPERATOR)" = "NOT IN");
  %let isString = (%QUPCASE(&amp;amp;TYPE) eq S or %QUPCASE(&amp;amp;TYPE) eq STRING );
  %if &amp;amp;isString %then
  %do;
	%if "&amp;amp;MATCH_CASE" eq "0" %then %do;
		%let COLUMN = %str(UPPER%(&amp;amp;COLUMN%));
	%end;
	%let q1=%str(%");
	%let q2=%str(%");
	%let sq1=%str(%'); 
	%let sq2=%str(%'); 
  %end;
  %else %if %QUPCASE(&amp;amp;TYPE) eq D or %QUPCASE(&amp;amp;TYPE) eq DATE %then 
  %do;
    %let q1=%str(%");
    %let q2=%str(%"d);
	%let sq1=%str(%'); 
    %let sq2=%str(%'); 
  %end;
  %else %if %QUPCASE(&amp;amp;TYPE) eq T or %QUPCASE(&amp;amp;TYPE) eq TIME %then
  %do;
    %let q1=%str(%");
    %let q2=%str(%"t);
	%let sq1=%str(%'); 
    %let sq2=%str(%'); 
  %end;
  %else %if %QUPCASE(&amp;amp;TYPE) eq DT or %QUPCASE(&amp;amp;TYPE) eq DATETIME %then
  %do;
    %let q1=%str(%");
    %let q2=%str(%"dt);
	%let sq1=%str(%'); 
    %let sq2=%str(%'); 
  %end;
  %else
  %do;
    %let q1=;
    %let q2=;
	%let sq1=;
    %let sq2=;
  %end;
  
  %if "&amp;amp;PARM" = "" %then %let PARM=&amp;amp;COLUMN;

  %let isBetween = ("%QUPCASE(&amp;amp;OPERATOR)"="BETWEEN" or "%QUPCASE(&amp;amp;OPERATOR)"="NOT BETWEEN");

  %if "&amp;amp;MAX" = "" %then %do;
    %let MAX = &amp;amp;parm._MAX;
    %if &amp;amp;isBetween %then %let PARM = &amp;amp;parm._MIN;
  %end;

  %if not %symexist(&amp;amp;PARM) or (&amp;amp;isBetween and not %symexist(&amp;amp;MAX)) %then %do;
    %if &amp;amp;IS_EXPLICIT=0 %then %do;
		not &amp;amp;MATCHALL_CLAUSE
	%end;
	%else %do;
	    not 1=1
	%end;
  %end;
  %else %if "%qupcase(&amp;amp;&amp;amp;&amp;amp;PARM)" = "%qupcase(&amp;amp;MATCHALL)" %then %do;
    %if &amp;amp;IS_EXPLICIT=0 %then %do;
	    &amp;amp;MATCHALL_CLAUSE
	%end;
	%else %do;
	    1=1
	%end;	
  %end;
  %else %if (not %symexist(&amp;amp;PARM._count)) or &amp;amp;isBetween %then %do;
    %let isEmpty = ("&amp;amp;&amp;amp;&amp;amp;PARM" = "");
    %if (&amp;amp;isEqual AND &amp;amp;isEmpty AND &amp;amp;isString) %then
       &amp;amp;COLUMN is null;
    %else %if (&amp;amp;isNotEqual AND &amp;amp;isEmpty AND &amp;amp;isString) %then
       &amp;amp;COLUMN is not null;
    %else %do;
	   %if &amp;amp;IS_EXPLICIT=0 %then %do;
           &amp;amp;COLUMN &amp;amp;OPERATOR 
			%if "&amp;amp;MATCH_CASE" eq "0" %then %do;
				%unquote(&amp;amp;q1)%QUPCASE(&amp;amp;&amp;amp;&amp;amp;PARM)%unquote(&amp;amp;q2)
			%end;
			%else %do;
				%unquote(&amp;amp;q1)&amp;amp;&amp;amp;&amp;amp;PARM%unquote(&amp;amp;q2)
			%end;
	   %end;
	   %else %do;
	       &amp;amp;COLUMN &amp;amp;OPERATOR 
			%if "&amp;amp;MATCH_CASE" eq "0" %then %do;
				%unquote(%nrstr(&amp;amp;sq1))%QUPCASE(&amp;amp;&amp;amp;&amp;amp;PARM)%unquote(%nrstr(&amp;amp;sq2))
			%end;
			%else %do;
				%unquote(%nrstr(&amp;amp;sq1))&amp;amp;&amp;amp;&amp;amp;PARM%unquote(%nrstr(&amp;amp;sq2))
			%end;
	   %end;
       %if &amp;amp;isBetween %then 
          AND %unquote(&amp;amp;q1)&amp;amp;&amp;amp;&amp;amp;MAX%unquote(&amp;amp;q2);
    %end;
  %end;
  %else 
  %do;
	%local emptyList;
  	%let emptyList = %symexist(&amp;amp;PARM._count);
  	%if &amp;amp;emptyList %then %let emptyList = &amp;amp;&amp;amp;&amp;amp;PARM._count = 0;
	%if (&amp;amp;emptyList) %then
	%do;
		%if (&amp;amp;isNotin) %then
		   1;
		%else
			0;
	%end;
	%else %if (&amp;amp;&amp;amp;&amp;amp;PARM._count = 1) %then 
    %do;
      %let isEmpty = ("&amp;amp;&amp;amp;&amp;amp;PARM" = "");
      %if (&amp;amp;isIn AND &amp;amp;isEmpty AND &amp;amp;isString) %then
        &amp;amp;COLUMN is null;
      %else %if (&amp;amp;isNotin AND &amp;amp;isEmpty AND &amp;amp;isString) %then
        &amp;amp;COLUMN is not null;
      %else %do;
	    %if &amp;amp;IS_EXPLICIT=0 %then %do;
			%if "&amp;amp;MATCH_CASE" eq "0" %then %do;
				&amp;amp;COLUMN &amp;amp;OPERATOR (%unquote(&amp;amp;q1)%QUPCASE(&amp;amp;&amp;amp;&amp;amp;PARM)%unquote(&amp;amp;q2))
			%end;
			%else %do;
				&amp;amp;COLUMN &amp;amp;OPERATOR (%unquote(&amp;amp;q1)&amp;amp;&amp;amp;&amp;amp;PARM%unquote(&amp;amp;q2))
			%end;
	    %end;
		%else %do;
		    &amp;amp;COLUMN &amp;amp;OPERATOR (
			%if "&amp;amp;MATCH_CASE" eq "0" %then %do;
				%unquote(%nrstr(&amp;amp;sq1))%QUPCASE(&amp;amp;&amp;amp;&amp;amp;PARM)%unquote(%nrstr(&amp;amp;sq2)))
			%end;
			%else %do;
				%unquote(%nrstr(&amp;amp;sq1))&amp;amp;&amp;amp;&amp;amp;PARM%unquote(%nrstr(&amp;amp;sq2)))
			%end;
		%end;
	  %end;
    %end;
    %else 
    %do;
       %local addIsNull addIsNotNull addComma;
       %let addIsNull = %eval(0);
       %let addIsNotNull = %eval(0);
       %let addComma = %eval(0);
       (&amp;amp;COLUMN &amp;amp;OPERATOR ( 
       %do i=1 %to &amp;amp;&amp;amp;&amp;amp;PARM._count; 
          %let isEmpty = ("&amp;amp;&amp;amp;&amp;amp;PARM&amp;amp;i" = "");
          %if (&amp;amp;isString AND &amp;amp;isEmpty AND (&amp;amp;isIn OR &amp;amp;isNotIn)) %then
          %do;
             %if (&amp;amp;isIn) %then %let addIsNull = 1;
             %else %let addIsNotNull = 1;
          %end;
          %else
          %do;		     
            %if &amp;amp;addComma %then %do;,%end;
			%if &amp;amp;IS_EXPLICIT=0 %then %do;
				%if "&amp;amp;MATCH_CASE" eq "0" %then %do;
					%unquote(&amp;amp;q1)%QUPCASE(&amp;amp;&amp;amp;&amp;amp;PARM&amp;amp;i)%unquote(&amp;amp;q2)
				%end;
				%else %do;
					%unquote(&amp;amp;q1)&amp;amp;&amp;amp;&amp;amp;PARM&amp;amp;i%unquote(&amp;amp;q2)
				%end;
			%end;
			%else %do;
				%if "&amp;amp;MATCH_CASE" eq "0" %then %do;
					%unquote(%nrstr(&amp;amp;sq1))%QUPCASE(&amp;amp;&amp;amp;&amp;amp;PARM&amp;amp;i)%unquote(%nrstr(&amp;amp;sq2))
				%end;
				%else %do;
					%unquote(%nrstr(&amp;amp;sq1))&amp;amp;&amp;amp;&amp;amp;PARM&amp;amp;i%unquote(%nrstr(&amp;amp;sq2))
				%end; 
			%end;
            %let addComma = %eval(1);
          %end;
       %end;) 
       %if &amp;amp;addIsNull %then OR &amp;amp;COLUMN is null;
       %else %if &amp;amp;addIsNotNull %then AND &amp;amp;COLUMN is not null;
       %do;)
       %end;
    %end;
  %end;
%mend _eg_WhereParam;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Jan 2022 14:29:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-modify-values-from-a-prompt/m-p/792182#M253819</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2022-01-25T14:29:23Z</dc:date>
    </item>
  </channel>
</rss>

