<?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 create a unix variable from the sas macro variable in unix shell script in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-unix-variable-from-the-sas-macro-variable-in/m-p/933024#M366993</link>
    <description>&lt;P&gt;&amp;nbsp;SAS Macro variables do not resolve inside single quotes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;X 'export Lvalue=&amp;amp;toto';&lt;/P&gt;
&lt;P&gt;uses single quotes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try&lt;/P&gt;
&lt;P&gt;X "export Lvalue=&amp;amp;toto";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jun 2024 15:47:39 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2024-06-19T15:47:39Z</dc:date>
    <item>
      <title>how to create a unix variable from the sas macro variable in unix shell script</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-unix-variable-from-the-sas-macro-variable-in/m-p/932987#M366986</link>
      <description>&lt;P&gt;hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope you are all doing well. I need small help in creating the unix variable from the sas macro variable in unix shell script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have go through all the available articles and links available but i am not able to succeed with this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the code am using&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is my sas code named test.sas&lt;/P&gt;&lt;P&gt;options symbolgen mprint;&lt;/P&gt;&lt;P&gt;%let toto =123;&lt;BR /&gt;X 'export Lvalue=&amp;amp;toto';&lt;/P&gt;&lt;P&gt;%put &amp;amp;=toto;&lt;/P&gt;&lt;P&gt;&amp;nbsp;above sas code is calling in the below unix shell script named test.sh&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sas -sysin&amp;nbsp; /{giving the path where the test.sas file is present}/test.sas -NOPRINT -nosyntaxcheck -noerrabend&lt;/P&gt;&lt;P&gt;echo $Lvalue&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is the result am getting while calling it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;sh -x test.sh&lt;BR /&gt;+ sas -sysin /{giving the path where the test.sas file is present}/test.sas -NOPRINT -nosyntaxcheck -noerrabend&lt;BR /&gt;/bin/bash: toto: command not found&lt;BR /&gt;+ echo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my expectation was&amp;nbsp;Lvalue has to resolve to 123 but am achieving with the above code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;could you please help on this. Thanks in advance for your help on this.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2024 13:28:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-unix-variable-from-the-sas-macro-variable-in/m-p/932987#M366986</guid>
      <dc:creator>sasismylife</dc:creator>
      <dc:date>2024-06-19T13:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a unix variable from the sas macro variable in unix shell script</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-unix-variable-from-the-sas-macro-variable-in/m-p/933024#M366993</link>
      <description>&lt;P&gt;&amp;nbsp;SAS Macro variables do not resolve inside single quotes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;X 'export Lvalue=&amp;amp;toto';&lt;/P&gt;
&lt;P&gt;uses single quotes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try&lt;/P&gt;
&lt;P&gt;X "export Lvalue=&amp;amp;toto";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2024 15:47:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-unix-variable-from-the-sas-macro-variable-in/m-p/933024#M366993</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-06-19T15:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a unix variable from the sas macro variable in unix shell script</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-unix-variable-from-the-sas-macro-variable-in/m-p/933025#M366994</link>
      <description>&lt;P&gt;Thanks for your response. I have tried that to but still not working.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2024 15:51:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-unix-variable-from-the-sas-macro-variable-in/m-p/933025#M366994</guid>
      <dc:creator>sasismylife</dc:creator>
      <dc:date>2024-06-19T15:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a unix variable from the sas macro variable in unix shell script</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-unix-variable-from-the-sas-macro-variable-in/m-p/933028#M366995</link>
      <description>&lt;P&gt;The environment variable you are setting is probably only going to live for as long as the shell that is running SAS lives.&amp;nbsp; So trying to find its value after SAS has finished is not likely to work.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2024 15:56:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-a-unix-variable-from-the-sas-macro-variable-in/m-p/933028#M366995</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-06-19T15:56:48Z</dc:date>
    </item>
  </channel>
</rss>

