<?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: How to get the name of programming being executed in SAS EG 6.1 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-name-of-program-being-executed-in-SAS-EG-6-1/m-p/430306#M106367</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/43025"&gt;@error_prone&lt;/a&gt;&amp;nbsp;- you are right, the&amp;nbsp;&amp;amp;_SASPROGRAMFILE variable doesn't exist in SAS Eg interactive mode. We have to search for other options.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jan 2018 08:02:46 GMT</pubDate>
    <dc:creator>mnjtrana</dc:creator>
    <dc:date>2018-01-24T08:02:46Z</dc:date>
    <item>
      <title>How to get the name of program being executed in SAS EG 6.1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-name-of-program-being-executed-in-SAS-EG-6-1/m-p/430007#M106253</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 use the below code to export my log from SAS Enterprise Guide 6.1 to a specified location based on the program name?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So basically i want to find out the program name so that i can put the below code in the SAS enterprise guide&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Option-&amp;gt;sas programs -&amp;gt;Additional sas code -&amp;gt;Insert custom SAS code before&amp;nbsp;submitted code&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have a grid environment, where we are using a Linux server to execute the code and frontend is SAS EG 6.1&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
%let Name = TEST1;
%let pgm_name = /* need help here */;
%let today= %sysfunc(putn(%sysfunc(today()),yymmddn8.));

proc printto  log = "/sas/develop/admin/&amp;amp;name./dev/logs/&amp;amp;pgm_name._&amp;amp;today..txt" new;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;i have tried many ways, but could not find any for doing this in interactive mode.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in Advance,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Manjeet&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 14:48:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-name-of-program-being-executed-in-SAS-EG-6-1/m-p/430007#M106253</guid>
      <dc:creator>mnjtrana</dc:creator>
      <dc:date>2018-01-24T14:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the name of programming being executed in SAS EG 6.1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-name-of-program-being-executed-in-SAS-EG-6-1/m-p/430011#M106256</link>
      <description>&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; pgmname() ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&amp;nbsp;&amp;nbsp; %local&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; retval ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&amp;nbsp;&amp;nbsp; %let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; retval = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%sysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;( getoption( sysin ) ) ; &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;/* batch mode */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&amp;nbsp;&amp;nbsp; %if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; %&lt;STRONG&gt;&lt;I&gt;isblank&lt;/I&gt;&lt;/STRONG&gt;( &amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;retval.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ) %&lt;STRONG&gt;&lt;I&gt;then&lt;/I&gt;&lt;/STRONG&gt; &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; retval = &amp;amp;_SASPROGRAMFILE ; &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;/* interactive mode */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;&amp;nbsp;&amp;nbsp; /* next line removes single quotes produced in interactive mode */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&amp;nbsp;&amp;nbsp; %qsysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;( compress( &amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;retval.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%str&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(%') ) )&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 14:57:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-name-of-program-being-executed-in-SAS-EG-6-1/m-p/430011#M106256</guid>
      <dc:creator>tbellmer_wf</dc:creator>
      <dc:date>2018-01-23T14:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the name of programming being executed in SAS EG 6.1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-name-of-program-being-executed-in-SAS-EG-6-1/m-p/430077#M106289</link>
      <description>&lt;P&gt;What????&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/133264"&gt;@tbellmer_wf&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BR /&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#008000"&gt;...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#008000"&gt;&amp;nbsp; &amp;nbsp;/* next line removes single quotes produced in interactive mode */&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;&amp;nbsp;&amp;nbsp; %qsysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;( compress( &amp;amp;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;retval.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;, &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;%str&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(%') ) )&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT color="#000080"&gt;&lt;STRONG&gt;...&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Why would you want to remove ALL of the&amp;nbsp;quotes from a string?&amp;nbsp; Wouldn't that make any string that includes quotes invalid?&lt;/P&gt;
&lt;P&gt;Are you trying to remove the outer quotes around the string?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%qsysfunc(dequote(&amp;amp;retval.))&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 16:43:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-name-of-program-being-executed-in-SAS-EG-6-1/m-p/430077#M106289</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-01-23T16:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the name of programming being executed in SAS EG 6.1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-name-of-program-being-executed-in-SAS-EG-6-1/m-p/430078#M106290</link>
      <description>Feel free to modify as you desire. I needed to do that for my purposes.</description>
      <pubDate>Tue, 23 Jan 2018 16:46:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-name-of-program-being-executed-in-SAS-EG-6-1/m-p/430078#M106290</guid>
      <dc:creator>tbellmer_wf</dc:creator>
      <dc:date>2018-01-23T16:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the name of programming being executed in SAS EG 6.1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-name-of-program-being-executed-in-SAS-EG-6-1/m-p/430091#M106293</link>
      <description>Take care to backup the code you added to EG options. Afaik the code is stored somewhere in %userprofile% directory, so if those directories aren't backuped all code is lost when the hard disk dies.&lt;BR /&gt;&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/133264"&gt;@tbellmer_wf&lt;/a&gt; are you sure, that _sysprogramfile exists in EG-sessions? Thought that this variable is only created in Studio, batch and display-manager sessions.</description>
      <pubDate>Tue, 23 Jan 2018 17:34:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-name-of-program-being-executed-in-SAS-EG-6-1/m-p/430091#M106293</guid>
      <dc:creator>error_prone</dc:creator>
      <dc:date>2018-01-23T17:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the name of programming being executed in SAS EG 6.1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-name-of-program-being-executed-in-SAS-EG-6-1/m-p/430304#M106365</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/133264"&gt;@tbellmer_wf&lt;/a&gt; thanks for the help.&lt;BR /&gt;&lt;BR /&gt;However the &amp;amp;_SASPROGRAMFILE variable doesn't exist in the SAS Eg. So this code won't help.</description>
      <pubDate>Wed, 24 Jan 2018 08:01:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-name-of-program-being-executed-in-SAS-EG-6-1/m-p/430304#M106365</guid>
      <dc:creator>mnjtrana</dc:creator>
      <dc:date>2018-01-24T08:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the name of programming being executed in SAS EG 6.1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-name-of-program-being-executed-in-SAS-EG-6-1/m-p/430306#M106367</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/43025"&gt;@error_prone&lt;/a&gt;&amp;nbsp;- you are right, the&amp;nbsp;&amp;amp;_SASPROGRAMFILE variable doesn't exist in SAS Eg interactive mode. We have to search for other options.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 08:02:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-name-of-program-being-executed-in-SAS-EG-6-1/m-p/430306#M106367</guid>
      <dc:creator>mnjtrana</dc:creator>
      <dc:date>2018-01-24T08:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the name of programming being executed in SAS EG 6.1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-name-of-program-being-executed-in-SAS-EG-6-1/m-p/430310#M106369</link>
      <description>&lt;P&gt;Afaik no variable holding the program-name exists. The variable _ClientProjectPath has name and path of the EG-project. If you are using macros SysMacroName has the name of macro being executed, there could be a function returning the path of the macro. Can't verify this right now.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 08:17:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-name-of-program-being-executed-in-SAS-EG-6-1/m-p/430310#M106369</guid>
      <dc:creator>error_prone</dc:creator>
      <dc:date>2018-01-24T08:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the name of programming being executed in SAS EG 6.1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-name-of-program-being-executed-in-SAS-EG-6-1/m-p/430412#M106387</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let x=%sysget(sas_execfilename);
%let y=%sysget(sas_execfilepath);

%put &amp;amp;x ;
%put &amp;amp;y ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Jan 2018 13:30:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-name-of-program-being-executed-in-SAS-EG-6-1/m-p/430412#M106387</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-01-24T13:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the name of programming being executed in SAS EG 6.1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-name-of-program-being-executed-in-SAS-EG-6-1/m-p/430430#M106390</link>
      <description>Oh but it actually does as I use this all the time. Apparently there are a few caveats so be sure to read this note: &lt;A href="http://support.sas.com/kb/59/744.html" target="_blank"&gt;http://support.sas.com/kb/59/744.html&lt;/A&gt;</description>
      <pubDate>Wed, 24 Jan 2018 14:00:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-the-name-of-program-being-executed-in-SAS-EG-6-1/m-p/430430#M106390</guid>
      <dc:creator>tbellmer_wf</dc:creator>
      <dc:date>2018-01-24T14:00:17Z</dc:date>
    </item>
  </channel>
</rss>

