<?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: Reading macro variable value in proc fcmp in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-macro-variable-value-in-proc-fcmp/m-p/798030#M313771</link>
    <description>&lt;P&gt;Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt; . Using the include worked perfectly.&lt;/P&gt;</description>
    <pubDate>Wed, 23 Feb 2022 14:15:42 GMT</pubDate>
    <dc:creator>ojaro</dc:creator>
    <dc:date>2022-02-23T14:15:42Z</dc:date>
    <item>
      <title>Reading macro variable value in proc fcmp</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-macro-variable-value-in-proc-fcmp/m-p/797997#M313758</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;Does anyone know if there is somehow a way to read macro variable within proc fcmp or pass information to fcmp some other way e.g. using inlib?&lt;/P&gt;
&lt;P&gt;I am hoping to do something similar to the the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let sdk_location = "/sdk_home";

proc fcmp;
declare object py(python);
submit into py;

# Load SDK.
import sys  
sys.path.insert(0, sdk_location + '/python3')
from sdk import *
...
...
...
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Olli&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 12:04:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-macro-variable-value-in-proc-fcmp/m-p/797997#M313758</guid>
      <dc:creator>ojaro</dc:creator>
      <dc:date>2022-02-23T12:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: Reading macro variable value in proc fcmp</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-macro-variable-value-in-proc-fcmp/m-p/797999#M313759</link>
      <description>&lt;P&gt;Did you try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc fcmp;
declare object py(python);
submit into py;

# Load SDK.
import sys  
sys.path.insert(0, &amp;amp;sdk_location. + '/python3')
from sdk import *
...
...
...
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This is just a guess, to see if SAS resolves the macro variable before the code is handed over to Python.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 12:07:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-macro-variable-value-in-proc-fcmp/m-p/797999#M313759</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-23T12:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: Reading macro variable value in proc fcmp</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-macro-variable-value-in-proc-fcmp/m-p/798001#M313760</link>
      <description>&lt;P&gt;But you can always do this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let sdk_location = /sdk_home;

filename inc temp;

data _null_;
file inc;
put "proc fcmp;";
put "declare object py(python);";
put "submit into py;";
put "# Load SDK.";
put "import sys ";
put "sys.path.insert(0, '&amp;amp;sdk_location.' + '/python3')";
put "from sdk import *";
put "further code here";
put "run;";
run;

%inc inc;

filename inc clear;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Feb 2022 12:11:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-macro-variable-value-in-proc-fcmp/m-p/798001#M313760</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-23T12:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: Reading macro variable value in proc fcmp</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-macro-variable-value-in-proc-fcmp/m-p/798030#M313771</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt; . Using the include worked perfectly.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 14:15:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-macro-variable-value-in-proc-fcmp/m-p/798030#M313771</guid>
      <dc:creator>ojaro</dc:creator>
      <dc:date>2022-02-23T14:15:42Z</dc:date>
    </item>
  </channel>
</rss>

