<?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: SAS linux working with pname and directory names? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-linux-working-with-pname-and-directory-names/m-p/934511#M367483</link>
    <description>&lt;P&gt;What you want is still unclear.&lt;/P&gt;
&lt;P&gt;So you have a bunch of files and you want to set 2 macro variables.&lt;/P&gt;
&lt;P&gt;How these files and these variables are to be used is still unexplained.&lt;/P&gt;
&lt;P&gt;Do you want to macro variables to show the location and name of the program when you run one of the programs?&lt;/P&gt;
&lt;P&gt;If so, set the macro variables using the value of&amp;nbsp;&lt;CODE class=" language-sas"&gt;%sysfunc(getoption(sysin))&lt;/CODE&gt; .&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jul 2024 05:32:49 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2024-07-03T05:32:49Z</dc:date>
    <item>
      <title>SAS linux working with pname and directory names?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-linux-working-with-pname-and-directory-names/m-p/934461#M367463</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I am not sure why, however I am hung up on Linux 'compress.' I can get a 'full path\filename', but my Linux parsing is not clicking.&lt;BR /&gt;&lt;BR /&gt;I need to get my program name and its directory name into program macro var(s), compressing out punctuation and alpha char on Linux?&amp;nbsp; I know how to do this on SAS Windows but am new to linux.&amp;nbsp; Can someone show me the trick?&lt;BR /&gt;&lt;BR /&gt;for example:&lt;BR /&gt;If I have directories (M&lt;STRONG&gt;20241&lt;/STRONG&gt;, M20242) for yyyyq, each with 4 programs with names like myprog20241.sas - myprog2032.sas, etc (see below)&lt;BR /&gt;/work/M&lt;STRONG&gt;20241&lt;/STRONG&gt;/&lt;BR /&gt;&amp;nbsp; &amp;nbsp;myprog20241.sas&amp;nbsp; &amp;nbsp; &amp;nbsp;, If I run this program I want a &amp;amp;myCWD. holding &lt;STRONG&gt;20241&lt;/STRONG&gt;, and &amp;amp;myprog. 20241 for this file&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;myprog&lt;U&gt;20234&lt;/U&gt;.sas&amp;nbsp; &amp;nbsp; &amp;nbsp;, If I run this program I want a &amp;amp;myCWD. holding 20241, and &amp;amp;myprog. &lt;U&gt;20234&lt;/U&gt; for this file etc. on down the list...&lt;BR /&gt;&amp;nbsp; &amp;nbsp;myprog20233.sas&lt;BR /&gt;&amp;nbsp; &amp;nbsp;myprog20232.sas&lt;BR /&gt;/work/M&lt;STRONG&gt;20242&lt;/STRONG&gt;/&lt;BR /&gt;&amp;nbsp; &amp;nbsp;myprog&lt;U&gt;20242&lt;/U&gt;.sas&amp;nbsp; &amp;nbsp; &amp;nbsp;, If I run this program I want a &amp;amp;myCWD. holding &lt;STRONG&gt;20242&lt;/STRONG&gt;, and &amp;amp;myprog. &lt;U&gt;20242&lt;/U&gt; for this file&lt;BR /&gt;&amp;nbsp; &amp;nbsp;myprog20241.sas&amp;nbsp; &amp;nbsp; &amp;nbsp;, If I run this program I want a &amp;amp;myCWD. holding 20242, and &amp;amp;myprog. 20241 for this file&lt;BR /&gt;&amp;nbsp; &amp;nbsp;myprog20234.sas&amp;nbsp; &amp;nbsp; &amp;nbsp;, If I run this program I want a &amp;amp;myCWD. holding 20242, and &amp;amp;myprog. 20234 for this file&lt;BR /&gt;&amp;nbsp; &amp;nbsp;myprog20233.sas&amp;nbsp; &amp;nbsp;, etc.&lt;BR /&gt;&lt;BR /&gt;Just showing samples of have and want. However, I would like the directories to be able to be any legal Linux directory name that happens to have a single yyyyq string within it, and the same for the program, which happens to have a single yyyyq string within the name. I guess the only other restriction is there are no other numbers within each name.&lt;BR /&gt;&lt;BR /&gt;-thank you&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 19:50:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-linux-working-with-pname-and-directory-names/m-p/934461#M367463</guid>
      <dc:creator>kjohnson76</dc:creator>
      <dc:date>2024-07-02T19:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAS linux working with pname and directory names?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-linux-working-with-pname-and-directory-names/m-p/934477#M367472</link>
      <description>&lt;P&gt;Some information is missing.&lt;/P&gt;
&lt;P&gt;How do you use the macro variables?&lt;/P&gt;
&lt;P&gt;Do you want to run all programs? Or choose just one?&lt;/P&gt;
&lt;P&gt;How is the program run?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What code do you have now that fails?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 22:39:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-linux-working-with-pname-and-directory-names/m-p/934477#M367472</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2024-07-02T22:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: SAS linux working with pname and directory names?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-linux-working-with-pname-and-directory-names/m-p/934480#M367473</link>
      <description>&lt;P&gt;I didn't really follow what your question was but perhaps it is related to this statement from your introduction?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt; &amp;nbsp;I can get a 'full path\filename',&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;If by that you mean to imply that you are trying to use \&amp;nbsp; (backslash) as the delimiter between subdirectories then that will not work on Unix.&amp;nbsp; On Unix you use / (slash) as the delimiter between subdirectories.&amp;nbsp; The backslash is used to "escape" the next character.&amp;nbsp; So&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;full path\filename&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Just means:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;full pathfilename&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;If you actually want to refer the filename in the directory full path then use:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;full path/filename&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 23:56:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-linux-working-with-pname-and-directory-names/m-p/934480#M367473</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-07-02T23:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: SAS linux working with pname and directory names?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-linux-working-with-pname-and-directory-names/m-p/934503#M367477</link>
      <description>I am sorry, I just want the macro variables set if I run the anyone program.&lt;BR /&gt;I do not care how, but typically we run them by hand. Sometimes we run them by cronjobs so if you want to share both starts that would be great, but one would get me past my mental blockage I am sure. (sorry that code is at work, I will have to share it later)</description>
      <pubDate>Wed, 03 Jul 2024 04:50:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-linux-working-with-pname-and-directory-names/m-p/934503#M367477</guid>
      <dc:creator>kjohnson76</dc:creator>
      <dc:date>2024-07-03T04:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: SAS linux working with pname and directory names?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-linux-working-with-pname-and-directory-names/m-p/934504#M367478</link>
      <description>&lt;P&gt;Sorry, set internal to any given program for use with that program, but each program will be run within the current Q for all four back quarters.&amp;nbsp; (so I guess '%local' would be appropriate)&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 04:54:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-linux-working-with-pname-and-directory-names/m-p/934504#M367478</guid>
      <dc:creator>kjohnson76</dc:creator>
      <dc:date>2024-07-03T04:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: SAS linux working with pname and directory names?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-linux-working-with-pname-and-directory-names/m-p/934506#M367480</link>
      <description>Sorry for the wrong slash. That was not my issue with my code at work...</description>
      <pubDate>Wed, 03 Jul 2024 04:56:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-linux-working-with-pname-and-directory-names/m-p/934506#M367480</guid>
      <dc:creator>kjohnson76</dc:creator>
      <dc:date>2024-07-03T04:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: SAS linux working with pname and directory names?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-linux-working-with-pname-and-directory-names/m-p/934511#M367483</link>
      <description>&lt;P&gt;What you want is still unclear.&lt;/P&gt;
&lt;P&gt;So you have a bunch of files and you want to set 2 macro variables.&lt;/P&gt;
&lt;P&gt;How these files and these variables are to be used is still unexplained.&lt;/P&gt;
&lt;P&gt;Do you want to macro variables to show the location and name of the program when you run one of the programs?&lt;/P&gt;
&lt;P&gt;If so, set the macro variables using the value of&amp;nbsp;&lt;CODE class=" language-sas"&gt;%sysfunc(getoption(sysin))&lt;/CODE&gt; .&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 05:32:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-linux-working-with-pname-and-directory-names/m-p/934511#M367483</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2024-07-03T05:32:49Z</dc:date>
    </item>
  </channel>
</rss>

