<?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: Issue in Customizing code to run the jobs irrespective of regions in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Issue-in-Customizing-code-to-run-the-jobs-irrespective-of/m-p/412915#M279907</link>
    <description>&lt;P&gt;Just use a macro parameter:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro data_conn_dev(reg);
%put "It's a &amp;amp;reg.";
%mend data_conn_dev;

%let reg=DEV;

%data_conn_dev(&amp;amp;reg.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that &amp;amp;reg. is local within the macro, so it's safe to use the same name in the global macro context.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Nov 2017 14:28:42 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-11-13T14:28:42Z</dc:date>
    <item>
      <title>Issue in Customizing code to run the jobs irrespective of regions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-in-Customizing-code-to-run-the-jobs-irrespective-of/m-p/412910#M279906</link>
      <description>&lt;P&gt;HI Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am customizing the code to run the job in all environments. Below is sample code existing today.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro DATA_CONN_DEV;&lt;/P&gt;&lt;P&gt;%PUT "It's a DEV ";&lt;/P&gt;&lt;P&gt;%mend DATA_CONN_DEV;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I have modified the code to customize.&lt;/P&gt;&lt;P&gt;%let reg=dev;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro DATA_CONN_&amp;amp;reg.; ---&amp;gt; Here macro name should contain environment name like dev,uat or prod&lt;/P&gt;&lt;P&gt;%PUT "It's a &amp;amp;reg,";&lt;/P&gt;&lt;P&gt;%mend DATA_CONN_&amp;amp;reg.;&lt;/P&gt;&lt;P&gt;%DATA_CONN_&amp;amp;reg.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I mention environment values in %let statement above code should work for all DEV,UAT,PROD.&lt;/P&gt;&lt;P&gt;But I am getting below error. Please suggest me what is the better way to customize this code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: Expected semicolon not found. The macro will not be compiled.&lt;/P&gt;&lt;P&gt;ERROR: A dummy macro will be compiled.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2017 14:17:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-in-Customizing-code-to-run-the-jobs-irrespective-of/m-p/412910#M279906</guid>
      <dc:creator>Banu</dc:creator>
      <dc:date>2017-11-13T14:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in Customizing code to run the jobs irrespective of regions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-in-Customizing-code-to-run-the-jobs-irrespective-of/m-p/412915#M279907</link>
      <description>&lt;P&gt;Just use a macro parameter:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro data_conn_dev(reg);
%put "It's a &amp;amp;reg.";
%mend data_conn_dev;

%let reg=DEV;

%data_conn_dev(&amp;amp;reg.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that &amp;amp;reg. is local within the macro, so it's safe to use the same name in the global macro context.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2017 14:28:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-in-Customizing-code-to-run-the-jobs-irrespective-of/m-p/412915#M279907</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-11-13T14:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in Customizing code to run the jobs irrespective of regions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-in-Customizing-code-to-run-the-jobs-irrespective-of/m-p/412917#M279908</link>
      <description>&lt;P&gt;You would not do it like that.&amp;nbsp; The line:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%macro DATA_CONN_&amp;amp;reg.;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This is the macro signature, it needs to be fixed, you cannot macrotize macro!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;What you want is a macro parameter:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;%macro data_conn (env=);
  %put Its a &amp;amp;env.;
%mend data_conn;

%data_conn (env=dev);
%data_conn (env=prod);
&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Nov 2017 14:32:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-in-Customizing-code-to-run-the-jobs-irrespective-of/m-p/412917#M279908</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-11-13T14:32:42Z</dc:date>
    </item>
  </channel>
</rss>

