<?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 modifying URLs in prewritten programs in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/modifying-URLs-in-prewritten-programs/m-p/937169#M368237</link>
    <description>&lt;P&gt;I'm running a bunch of programs with pre-written code that includes infile statements with URLs such as the code below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;infile '.\pbp\pbp_b1a_inpat_hosp.txt' delimiter = '09'x&lt;BR /&gt;dsd lrecl = 30000 firstobs=2 missover;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course, I can manually change the "." to a directory for each program, but I'm wondering if there is a way "point" the period to a directory.&lt;/P&gt;</description>
    <pubDate>Thu, 25 Jul 2024 20:42:36 GMT</pubDate>
    <dc:creator>Batman</dc:creator>
    <dc:date>2024-07-25T20:42:36Z</dc:date>
    <item>
      <title>modifying URLs in prewritten programs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/modifying-URLs-in-prewritten-programs/m-p/937169#M368237</link>
      <description>&lt;P&gt;I'm running a bunch of programs with pre-written code that includes infile statements with URLs such as the code below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;infile '.\pbp\pbp_b1a_inpat_hosp.txt' delimiter = '09'x&lt;BR /&gt;dsd lrecl = 30000 firstobs=2 missover;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course, I can manually change the "." to a directory for each program, but I'm wondering if there is a way "point" the period to a directory.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 20:42:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/modifying-URLs-in-prewritten-programs/m-p/937169#M368237</guid>
      <dc:creator>Batman</dc:creator>
      <dc:date>2024-07-25T20:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: modifying URLs in prewritten programs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/modifying-URLs-in-prewritten-programs/m-p/937172#M368238</link>
      <description>&lt;P&gt;How many programs do you expect to modify?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With that first "directory" have to change again? Note, Paths for files really should start at a drive, or in the case of a url a server, so there is no ambiguity as to what location is meant.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would all the other elements of the path stay the same would they need to change as well? You ask about . but what about the \php\? Will the new location have that folder? Other folders appearing in other paths?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are the programs all in the same location? A few locations? Scattered nearly randomly across multiple physical locations?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are potential time issues with some solutions to the "how many" question. If it takes a few hours to debug and verify an the values it is likely not worth the effort for just a few files but may be if there are hundreds involved.&lt;/P&gt;
&lt;P&gt;If the paths may have to change frequently then a likely approach would be to replace the . with a macro variable that could be set before running the programs. However you would also have to make the path inside double quotes for the macro variable to resolve.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If an approach has to search just to find the files that is another set of things to be resolved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the scrip locations are nice the source text is no worse than you show then perhaps a SED script would be sufficient, no SAS involved needed at all for text replacement.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 21:22:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/modifying-URLs-in-prewritten-programs/m-p/937172#M368238</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-07-25T21:22:48Z</dc:date>
    </item>
  </channel>
</rss>

