<?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: Storing my project name from my project path into a macro variable in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Storing-my-project-name-from-my-project-path-into-a-macro/m-p/728707#M38400</link>
    <description>&lt;P&gt;Ok,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I have a better code than the previous one but still does not work...&lt;/P&gt;&lt;PRE&gt;%let fname = %sysfunc(scan(&amp;amp;_CLIENTPROJECTPATH,-1,"\"));
%put &amp;amp;fname;&lt;/PRE&gt;&lt;P&gt;Any ideas ?&lt;/P&gt;</description>
    <pubDate>Wed, 24 Mar 2021 10:38:01 GMT</pubDate>
    <dc:creator>ctisseuil</dc:creator>
    <dc:date>2021-03-24T10:38:01Z</dc:date>
    <item>
      <title>Storing my project name from my project path into a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Storing-my-project-name-from-my-project-path-into-a-macro/m-p/728705#M38399</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to store the project name from my project path into a macro variable...&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, let say my path is '/myprojectpath/filename'. I want to store the macro variable 'filename'.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the macro that I have started to develop, without success :&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;%macro prgname;
%let s = &amp;amp;_CLIENTPROJECTPATH.;
%let delims = '\';
%let n = %sysfunc(countw(&amp;amp;s, &amp;amp;delims));
%let words = %sysfunc(scan(&amp;amp;s, 1:&amp;amp;n, &amp;amp;delims));
%mend prgname;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Could you highlight me ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your attention.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Clément&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 10:05:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Storing-my-project-name-from-my-project-path-into-a-macro/m-p/728705#M38399</guid>
      <dc:creator>ctisseuil</dc:creator>
      <dc:date>2021-03-24T10:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: Storing my project name from my project path into a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Storing-my-project-name-from-my-project-path-into-a-macro/m-p/728707#M38400</link>
      <description>&lt;P&gt;Ok,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I have a better code than the previous one but still does not work...&lt;/P&gt;&lt;PRE&gt;%let fname = %sysfunc(scan(&amp;amp;_CLIENTPROJECTPATH,-1,"\"));
%put &amp;amp;fname;&lt;/PRE&gt;&lt;P&gt;Any ideas ?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 10:38:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Storing-my-project-name-from-my-project-path-into-a-macro/m-p/728707#M38400</guid>
      <dc:creator>ctisseuil</dc:creator>
      <dc:date>2021-03-24T10:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: Storing my project name from my project path into a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Storing-my-project-name-from-my-project-path-into-a-macro/m-p/728708#M38401</link>
      <description>&lt;P&gt;The scan function has an option to start searching from the end of the string, called "B". Or you could use a negative number as second argument, so something like&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let cpp = %sysfunc(dequote(&amp;amp;_ClientProjectPath));
%let words = %sysfunc(scan(&amp;amp;cpp, -1, %str(\)));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;should work.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 10:39:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Storing-my-project-name-from-my-project-path-into-a-macro/m-p/728708#M38401</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-03-24T10:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: Storing my project name from my project path into a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Storing-my-project-name-from-my-project-path-into-a-macro/m-p/728711#M38403</link>
      <description>&lt;P&gt;Thank you Andreas,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works perfectly !&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 10:58:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Storing-my-project-name-from-my-project-path-into-a-macro/m-p/728711#M38403</guid>
      <dc:creator>ctisseuil</dc:creator>
      <dc:date>2021-03-24T10:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Storing my project name from my project path into a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Storing-my-project-name-from-my-project-path-into-a-macro/m-p/728731#M38406</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let name=%sysfunc(tranwrd(&amp;amp;_CLIENTPROJECTNAME,&amp;amp;_CLIENTPROJECTPATH,));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Mar 2021 12:36:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Storing-my-project-name-from-my-project-path-into-a-macro/m-p/728731#M38406</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2021-03-24T12:36:52Z</dc:date>
    </item>
  </channel>
</rss>

