<?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: macro syntax in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/macro-syntax/m-p/57011#M15922</link>
    <description>These points were mentioned and offered guidance in your other active post.  Your PROC SQL invocation needs to be syntactically correct if you want to generate SAS macro variables to use within a macro execution.  Or a DATA step approach is possible also, as was mentioned, using the CALL SYMPUT technique to register a SAS global macro variable.  Along with that, you must define your SAS macro with the macro variable (symbolic - using an ampersand) reference so that SAS will resolve them at compilation time.  To execute the macro with macro variables passed, you must specify them on the %MACRO statement as (macro_var_parameters);  -- within the parentheses.&lt;BR /&gt;
&lt;BR /&gt;
Short of what's already been offered (and there may be some to do the coding for you), it's time to get the DOC out and learn about SAS MACRO language programming, one step at a time.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
    <pubDate>Tue, 21 Jul 2009 18:50:38 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2009-07-21T18:50:38Z</dc:date>
    <item>
      <title>macro syntax</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/macro-syntax/m-p/57010#M15921</link>
      <description>I have a sample program like below..&lt;BR /&gt;
&lt;BR /&gt;
-----------------------------------------------------------------------------------------&lt;BR /&gt;
libname sasdata2 &lt;B&gt;'C:\DAG\SAS\Tests\'&lt;/B&gt;;&lt;BR /&gt;
&lt;BR /&gt;
data work;&lt;BR /&gt;
	set &lt;B&gt;sasdata2.STATE_EXTRACT&lt;/B&gt;;&lt;BR /&gt;
run;&lt;BR /&gt;
	  &lt;BR /&gt;
ODS CSV FILE = &lt;B&gt;'C:\DAG\SAS\Tests\CSV Files\Test1.csv'&lt;/B&gt;;&lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
select * from dictionary.tables where memname=&lt;B&gt;'STATE_EXTRACT'&lt;/B&gt;;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
ODS CSV CLOSE;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-----------------------------------------------------------------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
I want to convert the above to a macro with the places in bold replaced by macro arguments. Is this possible? especially the second higlighted text I'm not able to get what the syntax would be with macro arguments.&lt;BR /&gt;
&lt;BR /&gt;
the line sasdata2.STATE_EXTRACT&lt;BR /&gt;
&lt;BR /&gt;
Any help please?..&lt;BR /&gt;
&lt;BR /&gt;
Thanks &amp;amp; Regards,&lt;BR /&gt;
Neel</description>
      <pubDate>Tue, 21 Jul 2009 17:59:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/macro-syntax/m-p/57010#M15921</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-07-21T17:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: macro syntax</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/macro-syntax/m-p/57011#M15922</link>
      <description>These points were mentioned and offered guidance in your other active post.  Your PROC SQL invocation needs to be syntactically correct if you want to generate SAS macro variables to use within a macro execution.  Or a DATA step approach is possible also, as was mentioned, using the CALL SYMPUT technique to register a SAS global macro variable.  Along with that, you must define your SAS macro with the macro variable (symbolic - using an ampersand) reference so that SAS will resolve them at compilation time.  To execute the macro with macro variables passed, you must specify them on the %MACRO statement as (macro_var_parameters);  -- within the parentheses.&lt;BR /&gt;
&lt;BR /&gt;
Short of what's already been offered (and there may be some to do the coding for you), it's time to get the DOC out and learn about SAS MACRO language programming, one step at a time.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 21 Jul 2009 18:50:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/macro-syntax/m-p/57011#M15922</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-07-21T18:50:38Z</dc:date>
    </item>
  </channel>
</rss>

