<?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 macro variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/macro-variable/m-p/799540#M314405</link>
    <description>&lt;P&gt;I find a macro variable &amp;amp;g_job_date in sas programs but could not find the %let statement at all. Not even in autoexec.sas. Could it be some macro variable from SAS from a long time ago. The programs I am looking at were created over a decade ago I believe.&lt;/P&gt;</description>
    <pubDate>Wed, 02 Mar 2022 10:03:34 GMT</pubDate>
    <dc:creator>HeatherNewton</dc:creator>
    <dc:date>2022-03-02T10:03:34Z</dc:date>
    <item>
      <title>macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable/m-p/799540#M314405</link>
      <description>&lt;P&gt;I find a macro variable &amp;amp;g_job_date in sas programs but could not find the %let statement at all. Not even in autoexec.sas. Could it be some macro variable from SAS from a long time ago. The programs I am looking at were created over a decade ago I believe.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 10:03:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable/m-p/799540#M314405</guid>
      <dc:creator>HeatherNewton</dc:creator>
      <dc:date>2022-03-02T10:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable/m-p/799542#M314407</link>
      <description>&lt;P&gt;Macro variables can be set in numerous ways, e.g. CALL SYMPUT in a DATA step or SELECT INTO in PROC SQL.&lt;/P&gt;
&lt;P&gt;Codes used in EG or as a stored process can receive the macro variable from a defined prompt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the use of the macro variable does not result in a WARNING, then it has been defined.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 10:13:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable/m-p/799542#M314407</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-03-02T10:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable/m-p/799720#M314475</link>
      <description>I searched all sas files with g_job_date and excluding those show up with &amp;amp;g_job_date, there much be a line somewhere defining g_job_date, right? there are no call symput or select into... what can it be??&lt;BR /&gt;&lt;BR /&gt;what is EG and stored process?</description>
      <pubDate>Thu, 03 Mar 2022 02:14:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable/m-p/799720#M314475</guid>
      <dc:creator>HeatherNewton</dc:creator>
      <dc:date>2022-03-03T02:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable/m-p/799722#M314477</link>
      <description>&lt;P&gt;also i see variable declaration G_IFC_UTILITY_PATH using %global and it is defined as store 3rd-party software and macro, what does this mean, who is the third party here&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;there is a line in the initial sas file that runs all program and it says&amp;nbsp;&lt;/P&gt;&lt;P&gt;%Include "&amp;amp;G_IFC_UTILITY_PATH/utilities.sas"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what does this file do? is it a generic file from SAS?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 02:45:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable/m-p/799722#M314477</guid>
      <dc:creator>HeatherNewton</dc:creator>
      <dc:date>2022-03-03T02:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable/m-p/799730#M314485</link>
      <description>&lt;P&gt;%INCLUDE means to source in the content of a text file as lines of code.&lt;/P&gt;
&lt;P&gt;So you would want to also search such files to see if the macro is assigned its value there.&lt;/P&gt;
&lt;P&gt;You might not be able to find the code that is setting the value of your original macro because the code is generating the name to use for the macro variable.&lt;/P&gt;
&lt;P&gt;So I could use this statement in a data step to create G_JOB_DATE.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;call symputx(catx('_','g','job','date'),today());&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And you would have a hard time finding G_JOB_DATE in the code.&amp;nbsp; Even harder if part of the name comes from a variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have seen systems that store name value pairs in text files that are read in at the top of the program.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  infile 'vars.txt' truncover;
  input name :$32.  value $500.;
  call symputx(name,value);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Perhaps your INCLUDE file is doing that?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 04:25:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable/m-p/799730#M314485</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-03-03T04:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-variable/m-p/799769#M314511</link>
      <description>&lt;P&gt;EG is short for Enterprise Guide, the (most) widely used Windiws-based frontend for the SAS system.&lt;/P&gt;
&lt;P&gt;A Stored Process is similar to those in SQL. It is a SAS program stored on a server, defined in SAS metadata and accessible through the Stored Process Server (a bundled pool of permanently active SAS processes accessible through an IP port). Stored processes are usually developed in EG and take the prompt definition with them into SAS metadata when the definition is made.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 07:58:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-variable/m-p/799769#M314511</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-03-03T07:58:27Z</dc:date>
    </item>
  </channel>
</rss>

