<?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: Macro:  Display Only 1 Level of Resolution. (Advanced Question) :) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-Display-Only-1-Level-of-Resolution-Advanced-Question/m-p/789059#M252440</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For this to work, your macro variable CONNECTION needs to have the value &amp;amp;ProdConn or &amp;amp;TestConn.&amp;nbsp; The best way to see the value of the macro variable is to use %PUT _USER_ ; because it will shows you the value of CONNECTION without attempting any further resolution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that if you submit:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%LET ProdConn   = Foo ;
%LET Connection	=	&amp;amp;ProdConn;
%put _user_ ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You will see the CONNECTION has the value Foo, because &amp;amp;ProdConn is resolved when the %LET statement executes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One option might be to use %NRSTR in the %LET statement.&amp;nbsp; If you do that, the macro trigger &amp;amp; will be hidden, so Connection will resolve to the text &amp;amp;ProdConn but will not resolve that further, unless you use %unquote.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%LET ProdConn    = Foo ;
%LET Connection	=	%nrstr(&amp;amp;ProdConn);

%put _user_ ;
%put &amp;amp;Connection ;
%put %unquote(&amp;amp;Connection) ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Another option would be to use CALL SYMPUTX to write the value &amp;amp;ProdConn to CONNECTION.&amp;nbsp; If you use single quotes around the value, it will not attempt resolution.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%LET  ProdConn    = Foo ;
data _null_ ;
  call symputx('Connection','&amp;amp;ProdConn') ;
run ;
%put _user_ ;
%put &amp;amp;Connection ;         *Resolves &amp;amp;Connection-&amp;gt;&amp;amp;ProdConn-&amp;gt;Foo ;
%put %superq(Connection) ; *Resolves &amp;amp;Connection-&amp;gt;&amp;amp;ProdConn ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;A hack would be to we to run the assignment statements in the order below.&amp;nbsp; If &amp;amp;ProdConn does not exist when the %LET statement attempts to resolve it, it will issue a warning and the write the value &amp;amp;ProdConn to CONNECTION.&amp;nbsp; There are risks to this hack.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%symdel ProdConn Connection ;
%LET Connection	=	&amp;amp;ProdConn ;
%LET ProdConn    = Foo ;
%put _user_ ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 08 Jan 2022 18:20:54 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2022-01-08T18:20:54Z</dc:date>
    <item>
      <title>Macro:  Display Only 1 Level of Resolution. (Advanced Question) :)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Display-Only-1-Level-of-Resolution-Advanced-Question/m-p/789056#M252439</link>
      <description>&lt;P&gt;&lt;STRONG&gt;BACKGROUND:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I run some explicit pass through SQL using EG 8.2 Update 1 (8.2.1.1223) (32-bit) running SAS 9.4 M6.&amp;nbsp; My code connects to a database (Hive, if it matters) using a connection string.&amp;nbsp; See code snippet, below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I use the same code to connect to either our test or our production database.&amp;nbsp; I set a macro variable, Connection, to a macro variable that contains the value of connection string, either &amp;amp;ProdConn or &amp;amp;TestConn.&amp;nbsp; By setting Connection in the top of the program, I can run all subsequent steps without having to make any code changes.&amp;nbsp; The actual fully resolved value would be something like:&amp;nbsp;&amp;nbsp;{SAS003}6390DF19407B4A09B0E12790731FE4E3844FE7A4&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;GOAL:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I want to display in the log which connection string was used,&amp;nbsp;either &amp;amp;ProdConn or &amp;amp;TestConn, so that I can easily distinguish production runs vs. test runs.&amp;nbsp; I don't want to display the fully resolved value since I can't tell from something like&amp;nbsp;{SAS003}6390DF19407B4A09B0E12790731FE4E3844FE7A4 whether that's production or test.&amp;nbsp; I want to display the literal&amp;nbsp;&amp;amp;ProdConn or &amp;amp;TestConn, not the fully resolved value.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;QUESTION:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;How can I display&amp;nbsp;the literal&amp;nbsp;&amp;amp;ProdConn or &amp;amp;TestConn, not the fully resolved value?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;REMARKS:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I can make this work if I change my %LET statements to wrap the macro variables, either &amp;amp;ProdConn or &amp;amp;TestConn, in a %NRSTR().&amp;nbsp; However, in actual production code, a parameter file is used, not a hard coded %LET statement.&amp;nbsp; The parameter file just contains either &amp;amp;ProdConn or &amp;amp;TestConn.&amp;nbsp; I'd really like to just be able to determine which literal value was used, either &amp;amp;ProdConn or &amp;amp;TestConn.&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;This actually works&lt;/STRONG&gt; in one of my programs, but I can't figure out how it's working.&amp;nbsp; &amp;nbsp;Our Prod environment has many levels of macros calling macros.&amp;nbsp; So far I've been unable to replicate in new programs what one of our Production programs is already doing.&amp;nbsp; Maybe I'll eventually figure this out, but I'm guessing that I'm not the first person who has encountered this situation and that maybe somebody already knows how to do this.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At the bottom of this post, I've included a sample of the working code and the working results from that code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;**------------------------------------------------------------------------------**;
**	Set Connection string to either the production value or the test value.		**;
**------------------------------------------------------------------------------**;
%LET	Connection	=	&amp;amp;ProdConn;
*%LET	Connection	=	&amp;amp;TestConn;

**------------------------------------------------------------------------------**;
**	I want to display the literal &amp;amp;ProdConn or &amp;amp;TestCon, not resolved value.	**;
**	How can I display either &amp;amp;ProdConn or &amp;amp;TestCon but not the resolved value?	**;
**------------------------------------------------------------------------------**;
%PUT	&amp;amp;Connection;

**------------------------------------------------------------------------------**;
**	The SQL connects using the fully resolved value of &amp;amp;ProdConn or &amp;amp;TestConn.	**;
**	Example:  {SAS003}6390DF19407B4A09B0E12790731FE4E3844FE7A4					**;
**------------------------------------------------------------------------------**;
PROC	SQL	NOPRINT;
	CONNECT	TO	ODBC							AS		DB_Cnx	("&amp;amp;Connection");

	EXECUTE(
	SET	hive.resultset.use.unique.column.names	=		false)
		BY	DB_Cnx;
	
	DISCONNECT 									FROM	DB_Cnx;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is the line of code that produces the results I want.&amp;nbsp; See sample results below that.&amp;nbsp; However, pulling this code into a new program gives me the fully resolved value, not the single level of resolution that I'm looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%PUT	&amp;amp;Nte2  %Format_Line(%STR(  )Cnx_OPSI=%SUPERQ(Cnx_OPSI),				&amp;amp;Width);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample production results where this is already working (see third environmental parameter displayed below, Cnx_OPSI):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;       +------------------------------------------------+
NOTE:  | Pgm _Allo parameters                           |
       +------------------------------------------------+
       | Environmental Parameters                       |
       |   Environment=Development                      |
       |       ** Is your Environment correct? **       |
       |   DB=OPSIprd                                   |
       |   Cnx_OPSI=&amp;amp;CnxOPSIprd                         |
       |   Catalog=                                     |
       |   Obs=MAX                                      |
       |   SysObs=MAX                                   |
       |   Mode=REGULAR                                 |
       |   ACA_Data=ACADATA                             |
       |   Sleep=50                                     |
       |   Delay_Opt=DELAY                              |
       |   Delay_Time=50                                |
       |   Prompt=PROMPT                                |
       |   PRINTTO=NOPRINTTO                            |
       |   Delete_All=NOKILL                            |
       +------------------------------------------------+&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Jan 2022 17:53:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Display-Only-1-Level-of-Resolution-Advanced-Question/m-p/789056#M252439</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2022-01-08T17:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: Macro:  Display Only 1 Level of Resolution. (Advanced Question) :)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Display-Only-1-Level-of-Resolution-Advanced-Question/m-p/789059#M252440</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For this to work, your macro variable CONNECTION needs to have the value &amp;amp;ProdConn or &amp;amp;TestConn.&amp;nbsp; The best way to see the value of the macro variable is to use %PUT _USER_ ; because it will shows you the value of CONNECTION without attempting any further resolution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that if you submit:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%LET ProdConn   = Foo ;
%LET Connection	=	&amp;amp;ProdConn;
%put _user_ ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You will see the CONNECTION has the value Foo, because &amp;amp;ProdConn is resolved when the %LET statement executes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One option might be to use %NRSTR in the %LET statement.&amp;nbsp; If you do that, the macro trigger &amp;amp; will be hidden, so Connection will resolve to the text &amp;amp;ProdConn but will not resolve that further, unless you use %unquote.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%LET ProdConn    = Foo ;
%LET Connection	=	%nrstr(&amp;amp;ProdConn);

%put _user_ ;
%put &amp;amp;Connection ;
%put %unquote(&amp;amp;Connection) ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Another option would be to use CALL SYMPUTX to write the value &amp;amp;ProdConn to CONNECTION.&amp;nbsp; If you use single quotes around the value, it will not attempt resolution.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%LET  ProdConn    = Foo ;
data _null_ ;
  call symputx('Connection','&amp;amp;ProdConn') ;
run ;
%put _user_ ;
%put &amp;amp;Connection ;         *Resolves &amp;amp;Connection-&amp;gt;&amp;amp;ProdConn-&amp;gt;Foo ;
%put %superq(Connection) ; *Resolves &amp;amp;Connection-&amp;gt;&amp;amp;ProdConn ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;A hack would be to we to run the assignment statements in the order below.&amp;nbsp; If &amp;amp;ProdConn does not exist when the %LET statement attempts to resolve it, it will issue a warning and the write the value &amp;amp;ProdConn to CONNECTION.&amp;nbsp; There are risks to this hack.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%symdel ProdConn Connection ;
%LET Connection	=	&amp;amp;ProdConn ;
%LET ProdConn    = Foo ;
%put _user_ ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Jan 2022 18:20:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Display-Only-1-Level-of-Resolution-Advanced-Question/m-p/789059#M252440</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2022-01-08T18:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: Macro:  Display Only 1 Level of Resolution. (Advanced Question) :)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Display-Only-1-Level-of-Resolution-Advanced-Question/m-p/789064#M252444</link>
      <description>&lt;P&gt;Use a different macro variable.&lt;/P&gt;
&lt;P&gt;Let's call it ENVIRONMENT and use PROD or TEST as the possible values.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let environment=PROD;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So the see it in the LOG just use:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put &amp;amp;=environment;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And to set your existing CONNECTION macro variable based on the value of ENVIRONMENT use:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let connection=&amp;amp;&amp;amp;&amp;amp;environment.conn;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 08 Jan 2022 18:33:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Display-Only-1-Level-of-Resolution-Advanced-Question/m-p/789064#M252444</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-01-08T18:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: Macro:  Display Only 1 Level of Resolution. (Advanced Question) :)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Display-Only-1-Level-of-Resolution-Advanced-Question/m-p/789066#M252446</link>
      <description>&lt;P&gt;Probably your other examples have used one of these two methods to populate CONNECTION.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  call symputx('connection','&amp;amp;prodconn');
run;
%let connect=%nrstr(&amp;amp;)prodconn;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To see what is actually in the macro variable use %SUPERQ() to quote its contents.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put CONNECTION is %superq(connection) with value "&amp;amp;connection".;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 08 Jan 2022 18:55:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Display-Only-1-Level-of-Resolution-Advanced-Question/m-p/789066#M252446</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-01-08T18:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: Macro:  Display Only 1 Level of Resolution. (Advanced Question) :)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Display-Only-1-Level-of-Resolution-Advanced-Question/m-p/789068#M252448</link>
      <description>&lt;P&gt;Would it be possible instead of using CONNECT TO ODBC to have LIBNAME statement to establish the connection? Then you can use something like this to suppress your passwords from showing in the SAS log:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro setlib(lib, env);
	filename hide temp;
	proc printto log=hide;
	run;
	%local pw;
	%if %upcase(&amp;amp;env)=PROD %then %let pw={SAS003}XXXX;
	%if %upcase(&amp;amp;env)=DEVL %then %let pw={SAS003}YYYY;
	libname &amp;amp;lib {libarary definition} PW="&amp;amp;pw";
	filename hide clear;
	proc printto log=log;
	run;
%mend setlib;

%setlib(DB_CNX,Devl);

PROC SQL NOPRINT;
	EXECUTE(
	SET	hive.resultset.use.unique.column.names=false)
		BY	DB_Cnx;
QUIT;

libname DB_CNX clear;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Would this work for you?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Jan 2022 19:21:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Display-Only-1-Level-of-Resolution-Advanced-Question/m-p/789068#M252448</guid>
      <dc:creator>LeonidBatkhan</dc:creator>
      <dc:date>2022-01-08T19:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: Macro:  Display Only 1 Level of Resolution. (Advanced Question) :)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Display-Only-1-Level-of-Resolution-Advanced-Question/m-p/789070#M252450</link>
      <description>&lt;P&gt;Hi, Quentin,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for that.&amp;nbsp; I eventually figured out that it was the way the macro variable was created (which affects how it is stored) that made the difference.&amp;nbsp; If the macro variable is stored as a macro variable reference through %LET Connection = &lt;STRONG&gt;%NRSTR&lt;/STRONG&gt;(&amp;amp;ProdConn) or CALL SYMPUT('Connection', &lt;STRONG&gt;'&lt;/STRONG&gt;&amp;amp;ProdConn&lt;STRONG&gt;'&lt;/STRONG&gt;, 'G'), then the value in the macro table is literally &amp;amp;ProdConn, not the fully resolved connection string.&amp;nbsp; Note the &lt;EM&gt;single&lt;/EM&gt; quotes around &amp;amp;ProdConn in the CALL SYMPUT.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Having the value stored as a symbolic reference is what allows %SUPERQ to work.&amp;nbsp; I was getting hung up on thinking it was how the macro variable was resolved.&amp;nbsp; No, not really.&amp;nbsp; It's how it is stored that is essential, not the way that it is resolved.&amp;nbsp; If stored appropriately, then %SUPERQ is all that is needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The actual line of code that in my case creates the variable from the parameter file is:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;CALL	SYMPUTX(Var_Name, Var_Value, 'G');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Since Var_Value is a data step variable, no quotes are used, and the value is stored &lt;EM&gt;literally&lt;/EM&gt; as either &amp;amp;ProdConn or &amp;amp;TestConn.&amp;nbsp; Had it been a literal value with single quotes around it, perhaps I'd have picked up on it sooner.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, I really enjoyed the last BASUG that I attended.&amp;nbsp; The gentleman who presented (I think it was "how SAS thinks") was very knowledgeable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Sat, 08 Jan 2022 19:45:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Display-Only-1-Level-of-Resolution-Advanced-Question/m-p/789070#M252450</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2022-01-08T19:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Macro:  Display Only 1 Level of Resolution. (Advanced Question) :)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Display-Only-1-Level-of-Resolution-Advanced-Question/m-p/789071#M252451</link>
      <description>&lt;P&gt;Hi, Tom,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good work around.&amp;nbsp; I like people coming in with a different slant as you just did.&amp;nbsp; Your method would be completely satisfactory (so long as everyone in the shop uses appropriate naming conventions).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HJ&lt;/P&gt;</description>
      <pubDate>Sat, 08 Jan 2022 19:47:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Display-Only-1-Level-of-Resolution-Advanced-Question/m-p/789071#M252451</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2022-01-08T19:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: Macro:  Display Only 1 Level of Resolution. (Advanced Question) :)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Display-Only-1-Level-of-Resolution-Advanced-Question/m-p/789073#M252452</link>
      <description>&lt;P&gt;Yes, it is how it is stored that is critical.&amp;nbsp; That's a good technique, %PUT _USER_, to display the values.&amp;nbsp; I think&amp;nbsp; you also pointed out that %SUPERQ() works too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A third way, if one is using SAS Enterprise Guide, is to use the SAS Macro Variable Viewer under "Tools".&amp;nbsp; I kind of like this since it keeps my log clean if I'm doing production work.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jimbarbour_0-1641671428291.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67229i066F42D27B013369/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jimbarbour_0-1641671428291.png" alt="jimbarbour_0-1641671428291.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Sat, 08 Jan 2022 19:51:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Display-Only-1-Level-of-Resolution-Advanced-Question/m-p/789073#M252452</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2022-01-08T19:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Macro:  Display Only 1 Level of Resolution. (Advanced Question) :)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Display-Only-1-Level-of-Resolution-Advanced-Question/m-p/789074#M252453</link>
      <description>&lt;P&gt;Hi, Leonid.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hmm.&amp;nbsp; Interesting idea.&amp;nbsp; I'll have to play with that when I get a chance.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The one thing I &lt;EM&gt;do&lt;/EM&gt; want to see in my log is where the password came from, either from &amp;amp;ProdConn or &amp;amp;TestConn.&amp;nbsp; I just don't want the {SAS003}XXXXX value to show because, a) I can't tell if it's a Prod or a Test run, and b) I don't want to have the password show in the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Sat, 08 Jan 2022 19:55:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Display-Only-1-Level-of-Resolution-Advanced-Question/m-p/789074#M252453</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2022-01-08T19:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: Macro:  Display Only 1 Level of Resolution. (Advanced Question) :)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Display-Only-1-Level-of-Resolution-Advanced-Question/m-p/789148#M252479</link>
      <description>&lt;P&gt;If the value is available in a dataset then use SAS to print the values instead of the macro processor.&amp;nbsp; To the SAS language the &amp;amp; character is just like any other text.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  set macro_var_list;
  where var_name='CONNECTION';
  put var_name= var_value=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or use SYMGET() to pull the value back into a dataset.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  length connection $200;
  connection=symget('connection');
  put connection=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Jan 2022 16:50:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Display-Only-1-Level-of-Resolution-Advanced-Question/m-p/789148#M252479</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-01-09T16:50:03Z</dc:date>
    </item>
  </channel>
</rss>

