<?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 SAS Script to edit sas programs in a library in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Script-to-edit-sas-programs-in-a-library/m-p/22376#M4907</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; To simplify the edit activity, use a SAS macro variable to resolve the &amp;lt;libref&amp;gt; portion of your LIBNAME statement.&amp;nbsp; You can use a %INCLUDE statement to include / execute a SAS code member that contains the %LET statements needed to resolve the current-value of the &amp;lt;libref&amp;gt; portion.&amp;nbsp; And with that the actual LIBNAME statement and other code remains static.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scott Barry&lt;/P&gt;&lt;P&gt;SBBWorks, Inc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jun 2011 02:52:01 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2011-06-29T02:52:01Z</dc:date>
    <item>
      <title>SAS Script to edit sas programs in a library</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Script-to-edit-sas-programs-in-a-library/m-p/22372#M4903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement to change the libnames in a library that houses more than 500 sas programs.Is there any way that I can write a SAS program that goes to each of these programs and changes the &lt;/P&gt;&lt;P&gt;library name?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let us know your thoughts or any sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Renjith &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 16:23:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Script-to-edit-sas-programs-in-a-library/m-p/22372#M4903</guid>
      <dc:creator>ren2010</dc:creator>
      <dc:date>2011-06-28T16:23:16Z</dc:date>
    </item>
    <item>
      <title>SAS Script to edit sas programs in a library</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Script-to-edit-sas-programs-in-a-library/m-p/22373#M4904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; How many different LIBNAMEs are involved? What are the rules for changing the LIBNAMEs? If these two questions can't be answered cleanly then you may have some problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there are only a few LIBNAMES involved I might suggest moving the declarations to a common AUTOEXEC.SAS or included file than all users can share if that is practical in your environment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 16:35:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Script-to-edit-sas-programs-in-a-library/m-p/22373#M4904</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2011-06-28T16:35:47Z</dc:date>
    </item>
    <item>
      <title>SAS Script to edit sas programs in a library</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Script-to-edit-sas-programs-in-a-library/m-p/22374#M4905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Here is how I plan to change the libnames:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In old server: I have all the programs in the following library:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; libname old &lt;A href="https://communities.sas.com/"&gt;\\oldserver\\productionjobs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to change the above libname to the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;libname new &lt;A href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;A href="https://communities.sas.com/"&gt;\\newserver\\production\\job&lt;/A&gt;s&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only have the above mentioned libnames&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much for your reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 16:49:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Script-to-edit-sas-programs-in-a-library/m-p/22374#M4905</guid>
      <dc:creator>ren2010</dc:creator>
      <dc:date>2011-06-28T16:49:43Z</dc:date>
    </item>
    <item>
      <title>SAS Script to edit sas programs in a library</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Script-to-edit-sas-programs-in-a-library/m-p/22375#M4906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAS program is only a txt file.You can read .sas file just as .txt file and use data step and tranwrd() function to change these libname statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2011 01:39:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Script-to-edit-sas-programs-in-a-library/m-p/22375#M4906</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-06-29T01:39:30Z</dc:date>
    </item>
    <item>
      <title>SAS Script to edit sas programs in a library</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Script-to-edit-sas-programs-in-a-library/m-p/22376#M4907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; To simplify the edit activity, use a SAS macro variable to resolve the &amp;lt;libref&amp;gt; portion of your LIBNAME statement.&amp;nbsp; You can use a %INCLUDE statement to include / execute a SAS code member that contains the %LET statements needed to resolve the current-value of the &amp;lt;libref&amp;gt; portion.&amp;nbsp; And with that the actual LIBNAME statement and other code remains static.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scott Barry&lt;/P&gt;&lt;P&gt;SBBWorks, Inc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2011 02:52:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Script-to-edit-sas-programs-in-a-library/m-p/22376#M4907</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2011-06-29T02:52:01Z</dc:date>
    </item>
  </channel>
</rss>

