<?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 Juletip #18: How to Use the Macro Variable Viewer in SAS Enterprise Guide in SAS Community Nordic</title>
    <link>https://communities.sas.com/t5/SAS-Community-Nordic/Juletip-18-How-to-Use-the-Macro-Variable-Viewer-in-SAS/m-p/980938#M528</link>
    <description>&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;P&gt;For this Juletip, let's unwrap a gift that you might have never found or perhaps forgot that you had: the SAS Macro Variable Viewer in SAS Enterprise Guide.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ever wonder what’s happening behind the scenes with your macro variables? When your SAS programs rely on&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;%LET&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;statements,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;%SYSFUNC&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;calls, or conditional logic, keeping track of macro values can feel like detective work. Fortunately, SAS Enterprise Guide has a built-in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Macro Variable Viewer&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;that makes this easy—and even fun.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAS Macro Variable Viewer in EG" style="width: 932px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/112271i1A5293CEE88D667C/image-size/large?v=v2&amp;amp;px=999" role="button" title="ChrisHemedinger_0-1766015561761.png" alt="SAS Macro Variable Viewer in EG" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;SAS Macro Variable Viewer in EG&lt;/span&gt;&lt;/span&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Why Use the Macro Variable Viewer?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The Macro Variable Viewer is your one-stop shop for inspecting and debugging macro variables without cluttering your log with&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;%PUT&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;statements. Here’s what it can do:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;List all macro variables&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;currently defined in your session.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Show values instantly&lt;/STRONG&gt;—no extra code required.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Search by name&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to find what you need fast.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Evaluate macro expressions&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;using the built-in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Macro Expression Quick View&lt;/STRONG&gt;.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Refresh&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;as your program runs.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 id="toc-hId--896289394"&gt;&lt;STRONG&gt;How to Access It&lt;/STRONG&gt;&lt;/H3&gt;
&lt;OL&gt;
&lt;LI&gt;In SAS Enterprise Guide, go to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Tools → SAS Macro Variable Viewer&lt;/STRONG&gt;.&lt;/LI&gt;
&lt;LI&gt;The viewer opens in a separate window, displaying all macro variables in your session. You can keep this window open while you continue to edit and run your SAS programs!&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 id="toc-hId-846520941"&gt;&lt;STRONG&gt;Quick Tips for Using It&lt;/STRONG&gt;&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Search for a Macro Variable&lt;BR /&gt;&lt;/STRONG&gt;Type part of the name in the search box—like&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;_CLIENTAPP&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;or&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;MYVAR&lt;/CODE&gt;&lt;SPAN&gt;—and the list filters instantly.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Check Values Without Code&lt;BR /&gt;&lt;/STRONG&gt;Click any macro variable to see its value. No need for&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;%PUT&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;statements.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Evaluate Expressions&lt;BR /&gt;&lt;/STRONG&gt;Use the&amp;nbsp;&lt;STRONG&gt;Macro Expression Quick View&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;field and test macro functions and values on the fly:&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE class="lia-indent-padding-left-30px"&gt;&lt;CODE&gt;%eval(5+3)
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;BR /&gt;Or here's a more complext example, showing the date 3 weeks from today:&lt;/P&gt;
&lt;PRE class="lia-indent-padding-left-30px"&gt;&lt;CODE&gt;%sysfunc(intnx(week,"&amp;amp;sysdate9"d,3),date9.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;DIV&gt;
&lt;H3 id="toc-hId--1705636020"&gt;&lt;STRONG&gt;&lt;BR /&gt;Wrap-Up&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;Use the Macro Variable Viewer to help debug your programs and check macro output. It saves time and helps you avoid surprises when your macro-driven logic depends on dynamic values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next time you’re troubleshooting a macro-heavy program, skip the guesswork. Open the Macro Variable Viewer and take control of your macro environment—fast, easy, and interactive.&lt;/P&gt;
&lt;/DIV&gt;</description>
    <pubDate>Wed, 17 Dec 2025 23:57:42 GMT</pubDate>
    <dc:creator>ChrisHemedinger</dc:creator>
    <dc:date>2025-12-17T23:57:42Z</dc:date>
    <item>
      <title>Juletip #18: How to Use the Macro Variable Viewer in SAS Enterprise Guide</title>
      <link>https://communities.sas.com/t5/SAS-Community-Nordic/Juletip-18-How-to-Use-the-Macro-Variable-Viewer-in-SAS/m-p/980938#M528</link>
      <description>&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;P&gt;For this Juletip, let's unwrap a gift that you might have never found or perhaps forgot that you had: the SAS Macro Variable Viewer in SAS Enterprise Guide.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ever wonder what’s happening behind the scenes with your macro variables? When your SAS programs rely on&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;%LET&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;statements,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;%SYSFUNC&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;calls, or conditional logic, keeping track of macro values can feel like detective work. Fortunately, SAS Enterprise Guide has a built-in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Macro Variable Viewer&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;that makes this easy—and even fun.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAS Macro Variable Viewer in EG" style="width: 932px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/112271i1A5293CEE88D667C/image-size/large?v=v2&amp;amp;px=999" role="button" title="ChrisHemedinger_0-1766015561761.png" alt="SAS Macro Variable Viewer in EG" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;SAS Macro Variable Viewer in EG&lt;/span&gt;&lt;/span&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Why Use the Macro Variable Viewer?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The Macro Variable Viewer is your one-stop shop for inspecting and debugging macro variables without cluttering your log with&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;%PUT&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;statements. Here’s what it can do:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;List all macro variables&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;currently defined in your session.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Show values instantly&lt;/STRONG&gt;—no extra code required.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Search by name&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to find what you need fast.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Evaluate macro expressions&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;using the built-in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Macro Expression Quick View&lt;/STRONG&gt;.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Refresh&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;as your program runs.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 id="toc-hId--896289394"&gt;&lt;STRONG&gt;How to Access It&lt;/STRONG&gt;&lt;/H3&gt;
&lt;OL&gt;
&lt;LI&gt;In SAS Enterprise Guide, go to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Tools → SAS Macro Variable Viewer&lt;/STRONG&gt;.&lt;/LI&gt;
&lt;LI&gt;The viewer opens in a separate window, displaying all macro variables in your session. You can keep this window open while you continue to edit and run your SAS programs!&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 id="toc-hId-846520941"&gt;&lt;STRONG&gt;Quick Tips for Using It&lt;/STRONG&gt;&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Search for a Macro Variable&lt;BR /&gt;&lt;/STRONG&gt;Type part of the name in the search box—like&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;_CLIENTAPP&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;or&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;MYVAR&lt;/CODE&gt;&lt;SPAN&gt;—and the list filters instantly.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Check Values Without Code&lt;BR /&gt;&lt;/STRONG&gt;Click any macro variable to see its value. No need for&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;%PUT&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;statements.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Evaluate Expressions&lt;BR /&gt;&lt;/STRONG&gt;Use the&amp;nbsp;&lt;STRONG&gt;Macro Expression Quick View&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;field and test macro functions and values on the fly:&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE class="lia-indent-padding-left-30px"&gt;&lt;CODE&gt;%eval(5+3)
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;BR /&gt;Or here's a more complext example, showing the date 3 weeks from today:&lt;/P&gt;
&lt;PRE class="lia-indent-padding-left-30px"&gt;&lt;CODE&gt;%sysfunc(intnx(week,"&amp;amp;sysdate9"d,3),date9.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;DIV&gt;
&lt;H3 id="toc-hId--1705636020"&gt;&lt;STRONG&gt;&lt;BR /&gt;Wrap-Up&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;Use the Macro Variable Viewer to help debug your programs and check macro output. It saves time and helps you avoid surprises when your macro-driven logic depends on dynamic values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next time you’re troubleshooting a macro-heavy program, skip the guesswork. Open the Macro Variable Viewer and take control of your macro environment—fast, easy, and interactive.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 17 Dec 2025 23:57:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Community-Nordic/Juletip-18-How-to-Use-the-Macro-Variable-Viewer-in-SAS/m-p/980938#M528</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2025-12-17T23:57:42Z</dc:date>
    </item>
  </channel>
</rss>

