<?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: Creating a run book for different code to run in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-run-book-for-different-code-to-run/m-p/904945#M357481</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro run_snno(sn_no=);

data _null_;
set jobs;
where sn_no = &amp;amp;sn_no.;
rc = dosubl(catt("%include('", code_name, "');"));
run;


%mend;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;One possibility.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to pass multiple SN_NO this could be expanded to use IN instead easily.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/87248"&gt;@Nitish1003&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to create a run book to have all my code in one place with %include statement.&lt;/P&gt;
&lt;P&gt;I have a job code and code name. What I did is I created a dataset with Job_Code, code_name and added Sn_no. Now I am trying to create a macro so that I can pass the Sn_no and that particular code should get executed.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestion on how should I proceed with this? Thanks a lot for looking into it&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Nov 2023 18:31:33 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2023-11-28T18:31:33Z</dc:date>
    <item>
      <title>Creating a run book for different code to run</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-run-book-for-different-code-to-run/m-p/904943#M357479</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to create a run book to have all my code in one place with %include statement.&lt;/P&gt;
&lt;P&gt;I have a job code and code name. What I did is I created a dataset with Job_Code, code_name and added Sn_no. Now I am trying to create a macro so that I can pass the Sn_no and that particular code should get executed.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestion on how should I proceed with this? Thanks a lot for looking into it&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 18:19:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-run-book-for-different-code-to-run/m-p/904943#M357479</guid>
      <dc:creator>Nitish1003</dc:creator>
      <dc:date>2023-11-28T18:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a run book for different code to run</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-run-book-for-different-code-to-run/m-p/904945#M357481</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro run_snno(sn_no=);

data _null_;
set jobs;
where sn_no = &amp;amp;sn_no.;
rc = dosubl(catt("%include('", code_name, "');"));
run;


%mend;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;One possibility.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to pass multiple SN_NO this could be expanded to use IN instead easily.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/87248"&gt;@Nitish1003&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to create a run book to have all my code in one place with %include statement.&lt;/P&gt;
&lt;P&gt;I have a job code and code name. What I did is I created a dataset with Job_Code, code_name and added Sn_no. Now I am trying to create a macro so that I can pass the Sn_no and that particular code should get executed.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestion on how should I proceed with this? Thanks a lot for looking into it&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 18:31:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-run-book-for-different-code-to-run/m-p/904945#M357481</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-11-28T18:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a run book for different code to run</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-run-book-for-different-code-to-run/m-p/905211#M357542</link>
      <description>&lt;P&gt;Thanks a lot this helped&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 16:55:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-run-book-for-different-code-to-run/m-p/905211#M357542</guid>
      <dc:creator>Nitish1003</dc:creator>
      <dc:date>2023-11-29T16:55:26Z</dc:date>
    </item>
  </channel>
</rss>

