<?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: Definiy key variables as macro variable by using proc format in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Definiy-key-variables-as-macro-variable-by-using-proc-format/m-p/397870#M25577</link>
    <description>&lt;P&gt;%let newvar = %sysfunc(putc(&amp;amp;oldvar, $dom));&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Sep 2017 18:44:33 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2017-09-21T18:44:33Z</dc:date>
    <item>
      <title>Definiy key variables as macro variable by using proc format</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Definiy-key-variables-as-macro-variable-by-using-proc-format/m-p/397864#M25575</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;If I have this format&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;format&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;VALUE&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; $DOM&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'AE'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'USUBJID AETERM AESTDTC'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'CE'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'USUBJID CETERM CESTDTC'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'CM'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'USUBJID CMTRT CMROUTE CMSTDTC'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'DD'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'USUBJID'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'DM'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'USUBJID'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;I have the macro variables which take the value AE, CE etc, how can I definy a new macro variable which will take &lt;FONT color="#800080" face="Courier New" size="3"&gt;'USUBJID AETERM AESTDTC'&lt;/FONT&gt; for AE??&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2017 18:38:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Definiy-key-variables-as-macro-variable-by-using-proc-format/m-p/397864#M25575</guid>
      <dc:creator>Jomaa</dc:creator>
      <dc:date>2017-09-21T18:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Definiy key variables as macro variable by using proc format</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Definiy-key-variables-as-macro-variable-by-using-proc-format/m-p/397868#M25576</link>
      <description>&lt;P&gt;For example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data _null_;
    call symputx("newmacrovariable",put("&amp;amp;origmacrovariable",$dom.));
run;&lt;/PRE&gt;
&lt;P&gt;As a side issue (but it may be relatively important), you don't normally apply formats to macro variables, and it may be there's an easier way to achieve whatever it is you are doing without macro variables, or without formats. I can say more because I'd need a lot more details about what you are doing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2017 18:43:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Definiy-key-variables-as-macro-variable-by-using-proc-format/m-p/397868#M25576</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-09-21T18:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: Definiy key variables as macro variable by using proc format</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Definiy-key-variables-as-macro-variable-by-using-proc-format/m-p/397870#M25577</link>
      <description>&lt;P&gt;%let newvar = %sysfunc(putc(&amp;amp;oldvar, $dom));&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2017 18:44:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Definiy-key-variables-as-macro-variable-by-using-proc-format/m-p/397870#M25577</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-09-21T18:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Definiy key variables as macro variable by using proc format</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Definiy-key-variables-as-macro-variable-by-using-proc-format/m-p/397874#M25578</link>
      <description>Thanks so much..your code above gave me what I want. Actually I'm comparing old vs current transfer, I have the list of domains in a macro variable, I need to associate it with key variables.</description>
      <pubDate>Thu, 21 Sep 2017 18:50:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Definiy-key-variables-as-macro-variable-by-using-proc-format/m-p/397874#M25578</guid>
      <dc:creator>Jomaa</dc:creator>
      <dc:date>2017-09-21T18:50:36Z</dc:date>
    </item>
  </channel>
</rss>

