<?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: Using _eg_WhereParam Prompts in titles in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/358367#M23606</link>
    <description>&lt;P&gt;Excellent! Glad to hear there's some progress.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I suggest is that you create a different chartit macro, and just reflect back the information that's being passed in. That might give you some insight into what's not working right.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
    <pubDate>Fri, 12 May 2017 22:26:59 GMT</pubDate>
    <dc:creator>TomKari</dc:creator>
    <dc:date>2017-05-12T22:26:59Z</dc:date>
    <item>
      <title>Using _eg_WhereParam Prompts in titles</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/355278#M23386</link>
      <description>&lt;P&gt;Good day,&lt;/P&gt;&lt;P&gt;I've created a stored process with EG 7.12 which allows multiple selections with a prompt using _eg_WhereParam&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Works great.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I want to put the selection(s) chosen into a title for the report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;_eg_WhereParam creates a new version of the prompt for each value, for example for the prompt for "Period" I get.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PERIOD=1&lt;/P&gt;&lt;P&gt;PERIOD0=2&lt;/P&gt;&lt;P&gt;PERIOD1=1&lt;/P&gt;&lt;P&gt;PERIOD2=4&lt;/P&gt;&lt;P&gt;PERIOD_COUNT=2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I code/build a title statement without specifying each "version" of the prompt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's what I have now....&lt;/P&gt;&lt;P&gt;"title period &amp;amp;period1 &amp;amp;period2 Year &amp;amp;year;"&lt;/P&gt;&lt;P&gt;But there can be any number of selections...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideas please....and thanks in advance!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 15:17:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/355278#M23386</guid>
      <dc:creator>BHull</dc:creator>
      <dc:date>2017-05-02T15:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using _eg_WhereParam Prompts in titles</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/355287#M23387</link>
      <description>&lt;P&gt;Assuming that PERIOD_COUNT is the number of returned values for the prompt, something like this (untested):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a macro for your code, and within it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;title period %do _i = 1 %to &amp;amp;PERIOD_COUNT; &amp;amp;&amp;amp;period&amp;amp;_i. %end; Year &amp;amp;year;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 15:37:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/355287#M23387</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2017-05-02T15:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using _eg_WhereParam Prompts in titles</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/355339#M23388</link>
      <description>Tom,&lt;BR /&gt;Thank you for your advice, but I'm still struggling.&lt;BR /&gt;I'm not proficient with macros, but here's what I tried...with no results.&lt;BR /&gt;Appreciate your help!&lt;BR /&gt;&lt;BR /&gt;292 +%macro title1;&lt;BR /&gt;293 +title period %do _i = 1 %to &amp;amp;PERIOD_COUNT; &amp;amp;&amp;amp;period&amp;amp;_i. %end; Year &amp;amp;year;&lt;BR /&gt;294 +%smend title1;&lt;BR /&gt;295 +run;&lt;BR /&gt;296 +&lt;BR /&gt;297 +proc print;&lt;BR /&gt;298 +Title &amp;amp;title1;&lt;BR /&gt;299 +run;&lt;BR /&gt;</description>
      <pubDate>Tue, 02 May 2017 17:53:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/355339#M23388</guid>
      <dc:creator>BHull</dc:creator>
      <dc:date>2017-05-02T17:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using _eg_WhereParam Prompts in titles</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/355346#M23389</link>
      <description>&lt;P&gt;Yes, macros are quite something to get your head around at first!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You've absolutely got the right idea. Here's what worked for me: everything before the %macro statement is just setting up data that should already be there in your program, but I've left it there to give you something to practice with.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once you're happy with that, you should just need the code from the %macro statement to the end.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Give it a try,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; Tom&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; PERIOD_COUNT = 2;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; PERIOD1 = 9;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; PERIOD2 = 6;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; year = 2014;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; work.class;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; sashelp.class;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;; &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* To load a dataset in the _LAST_ position */&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; &lt;STRONG&gt;&lt;I&gt;title1&lt;/I&gt;&lt;/STRONG&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt; title period &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%do&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; _i = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%to&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; &amp;amp;PERIOD_COUNT; &amp;amp;&amp;amp;period&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;_i.&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%end&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;; Year &amp;amp;year;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;proc print;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;%&lt;STRONG&gt;&lt;I&gt;title1&lt;/I&gt;&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 18:23:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/355346#M23389</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2017-05-02T18:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using _eg_WhereParam Prompts in titles</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/358237#M23588</link>
      <description>Tom,&lt;BR /&gt;Your last suggestion worked great...thanks...&lt;BR /&gt;I'm trying to expand on that logic and getting nowhere.&lt;BR /&gt;I'm simply trying to iterate through and execute a macro N number of times.&lt;BR /&gt;Here are two attempts...one with macro the other with data step. both fail to resolve _i&lt;BR /&gt;I don't think I can use the CALL function inside the macro...that's why I tried data step...&lt;BR /&gt;I'm stuck...any suggestions...and thank you!&lt;BR /&gt;%macro charts;&lt;BR /&gt;%do _i = 1 %to &amp;amp;PERIOD_COUNT;&lt;BR /&gt;&amp;amp;let year=&amp;amp;year&amp;amp;_i.;&lt;BR /&gt;call symputx('YEARCODE','and (put(t1.SALES_YEAR,4.)) = &amp;amp;&amp;amp;YEAR&amp;amp;i');&lt;BR /&gt;call symputx('yeartitle',&amp;amp;&amp;amp;year&amp;amp;i);&lt;BR /&gt;%let YEARCODE='and (put(t1.SALES_YEAR,4.)) = &amp;amp;&amp;amp;YEAR');&lt;BR /&gt;%let yeartitle=&amp;amp;year;&lt;BR /&gt;%let market=&amp;amp;marketx;&lt;BR /&gt;call execute('%chartit');&lt;BR /&gt;%end;&lt;BR /&gt;run;&lt;BR /&gt;%mend;&lt;BR /&gt;%charts;&lt;BR /&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt;do _i = 1 to &amp;amp;PERIOD_COUNT;&lt;BR /&gt;%let year=&amp;amp;year&amp;amp;_i.;&lt;BR /&gt;call symputx('YEARCODE','and (put(t1.SALES_YEAR,4.)) = &amp;amp;&amp;amp;YEAR');&lt;BR /&gt;call symputx('yeartitle',&amp;amp;&amp;amp;year);&lt;BR /&gt;%let yeartitle=&amp;amp;&amp;amp;year);&lt;BR /&gt;call execute('%chartit');&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 12 May 2017 14:04:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/358237#M23588</guid>
      <dc:creator>BHull</dc:creator>
      <dc:date>2017-05-12T14:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using _eg_WhereParam Prompts in titles</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/358296#M23593</link>
      <description>&lt;P&gt;Yes, you're tied up in a couple of common macro problems. It's hard to see exactly where you want to get, so let's start with some of the easier problems.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your first program:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. I'm assuming you've set PERIOD_COUNT previously. I've added a line to set it to 5.&lt;/P&gt;
&lt;P&gt;2. You're using the macro variable &amp;amp;year before you set it, which won't work. I've added a line to set it to 2017.&lt;/P&gt;
&lt;P&gt;3. Your code has &amp;amp;let. You need to use %let.&lt;/P&gt;
&lt;P&gt;4. Once you've made these changes, your&lt;/P&gt;
&lt;P&gt;%let year=&amp;amp;year&amp;amp;_i.;&lt;/P&gt;
&lt;P&gt;statement is going to keep extending your value.&lt;/P&gt;
&lt;P&gt;5. If you're using macro references that you want to resolve, you need to use double quotes (") instead of single (').&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a program that will show you what's happening. The %put statement is absolutely wonderful for diagnosing these problems!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Give this a spin, and work at it a bit more.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; PERIOD_COUNT=5;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; year=2017;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; &lt;STRONG&gt;&lt;I&gt;charts&lt;/I&gt;&lt;/STRONG&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%do&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; _i = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%to&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; &amp;amp;PERIOD_COUNT;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; year=&amp;amp;year&amp;amp;_i.;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%put&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; &amp;amp;=PERIOD_COUNT &amp;amp;=_i &amp;amp;=year;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%end&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;%&lt;STRONG&gt;&lt;I&gt;charts&lt;/I&gt;&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2017 17:33:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/358296#M23593</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2017-05-12T17:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using _eg_WhereParam Prompts in titles</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/358301#M23595</link>
      <description>Tom,&lt;BR /&gt;Thank you for your patience...&lt;BR /&gt;I finally realized my problem...&lt;BR /&gt;I'm not trying to replace the VALUE in the macro but to rename it...&lt;BR /&gt;I have an original program which uses the &amp;amp;YEAR throughout...but only allows for 1 year.&lt;BR /&gt;This mod is to allow multiple year selection and execute the code for each year separately.&lt;BR /&gt;&amp;amp;YEAR1=2016, &amp;amp;YEAR2=2017...&lt;BR /&gt;So what I want is to replace &amp;amp;YEAR with &amp;amp;YEAR1, &amp;amp;YEAR2....until the PERIOD_COUNT is reached...&lt;BR /&gt;Any ideas on this???&lt;BR /&gt;Thanks...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 12 May 2017 17:42:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/358301#M23595</guid>
      <dc:creator>BHull</dc:creator>
      <dc:date>2017-05-12T17:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using _eg_WhereParam Prompts in titles</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/358310#M23598</link>
      <description>&lt;P&gt;Okay, so here's another snippet to move you along.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note how to refer to macro variables that are made up of other macro variables, like in the second %put statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; PERIOD_COUNT=5;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; year=2015;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; &lt;STRONG&gt;&lt;I&gt;charts&lt;/I&gt;&lt;/STRONG&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%do&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; _i = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%to&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; &amp;amp;PERIOD_COUNT;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; year&amp;amp;_i. = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%eval&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;(&amp;amp;year+&amp;amp;_i);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%put&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; &amp;amp;=PERIOD_COUNT &amp;amp;=_i &amp;amp;=year;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%put&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; &amp;amp;&amp;amp;year&amp;amp;_i;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%put&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; &amp;amp;year1 &amp;amp;year2 &amp;amp;year3 &amp;amp;year4 &amp;amp;year5;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%end&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;%&lt;STRONG&gt;&lt;I&gt;charts&lt;/I&gt;&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And this might be what you're after, but I'm not positive.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; PERIOD_COUNT=5;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; year=2015;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; &lt;STRONG&gt;&lt;I&gt;charts&lt;/I&gt;&lt;/STRONG&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%do&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; _i = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%to&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; &amp;amp;PERIOD_COUNT;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; year = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%eval&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;(&amp;amp;year+1);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%put&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; &amp;amp;=PERIOD_COUNT &amp;amp;=_i &amp;amp;=year;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%end&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;%&lt;STRONG&gt;&lt;I&gt;charts&lt;/I&gt;&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2017 18:17:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/358310#M23598</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2017-05-12T18:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using _eg_WhereParam Prompts in titles</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/358317#M23601</link>
      <description>Tom,&lt;BR /&gt;I do appreciate your patience...but this is not what I'm after...&lt;BR /&gt;First of all data being passed into &amp;amp;year is character...I think I can fix that...&lt;BR /&gt;Here's an idea of what I'm trying to do...&lt;BR /&gt;Multiple years are passed in by stored process prompts then each processed separately...&lt;BR /&gt;Year1='2015'&lt;BR /&gt;Year2='2016'&lt;BR /&gt;Year3='2017'&lt;BR /&gt;Data test;&lt;BR /&gt;Set work.yeardata;&lt;BR /&gt;If &amp;amp;year=year then list;&lt;BR /&gt;Else delete;&lt;BR /&gt;&lt;BR /&gt;I want to replace in the code the variable name &amp;amp;year with &amp;amp;year1, then loop back through and process &amp;amp;year2, and &amp;amp;year3...etc...;&lt;BR /&gt;So it would look like this in the log...&lt;BR /&gt;Data test;&lt;BR /&gt;Set work.yeardata;&lt;BR /&gt;If &amp;amp;year1=year then list;&lt;BR /&gt;Else delete;&lt;BR /&gt;Data test;&lt;BR /&gt;Set work.yeardata;&lt;BR /&gt;If &amp;amp;year2=year then list;&lt;BR /&gt;Else delete;&lt;BR /&gt;Data test;&lt;BR /&gt;Set work.yeardata;&lt;BR /&gt;If &amp;amp;year3=year then list;&lt;BR /&gt;Else delete;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 12 May 2017 18:44:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/358317#M23601</guid>
      <dc:creator>BHull</dc:creator>
      <dc:date>2017-05-12T18:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using _eg_WhereParam Prompts in titles</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/358325#M23602</link>
      <description>&lt;P&gt;Okay, I think I see where you're going.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Give this a try...the first data step, and the five %let statements for year1 to year5, are just setup to emulate your situation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; have;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;length&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; year $&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;4&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;input&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; year number;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;cards&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;2015 123&lt;/P&gt;
&lt;P&gt;2016 456&lt;/P&gt;
&lt;P&gt;2017 789&lt;/P&gt;
&lt;P&gt;2018 987&lt;/P&gt;
&lt;P&gt;2019 684&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; year1=2015;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; year2=2016;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; year3=2017;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; year4=2018;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; year5=2019;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; PERIOD_COUNT=5;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; &lt;STRONG&gt;&lt;I&gt;charts&lt;/I&gt;&lt;/STRONG&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%do&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; _i = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%to&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; &amp;amp;PERIOD_COUNT;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set have;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;if &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"&amp;amp;&amp;amp;year&amp;amp;_i."&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = year then output;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;proc print data=want;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%end&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;%&lt;STRONG&gt;&lt;I&gt;charts&lt;/I&gt;&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2017 19:15:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/358325#M23602</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2017-05-12T19:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using _eg_WhereParam Prompts in titles</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/358340#M23604</link>
      <description>Code work perfectly when run alone...you nailed what I needed...&lt;BR /&gt;However when I try it with my huge amount of code in the macro %chartit...I get nothing...&lt;BR /&gt;Thank you for your help today...have a great weekend...&lt;BR /&gt;</description>
      <pubDate>Fri, 12 May 2017 20:08:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/358340#M23604</guid>
      <dc:creator>BHull</dc:creator>
      <dc:date>2017-05-12T20:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using _eg_WhereParam Prompts in titles</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/358367#M23606</link>
      <description>&lt;P&gt;Excellent! Glad to hear there's some progress.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I suggest is that you create a different chartit macro, and just reflect back the information that's being passed in. That might give you some insight into what's not working right.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2017 22:26:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-eg-WhereParam-Prompts-in-titles/m-p/358367#M23606</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2017-05-12T22:26:59Z</dc:date>
    </item>
  </channel>
</rss>

