<?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: CALL EXECUTE for MACRO in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/CALL-EXECUTE-for-MACRO/m-p/230081#M54450</link>
    <description>&lt;P&gt;Thank you so much you are a genius... actually in my table "PROGRAM_CHECK " is in character format so I thought &amp;nbsp;in &lt;STRONG&gt;if&lt;/STRONG&gt; statement it should be in quotations(i.e&amp;nbsp;%if &amp;amp;CHECKER=&lt;STRONG&gt;&amp;nbsp;'PROGRAM_CHECK'&lt;/STRONG&gt; %THEN .....) but it executed when it is &lt;STRONG&gt;not&lt;/STRONG&gt; in the &lt;STRONG&gt;Quotes ..&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;If possible can you also tell me the reason ?&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Thanks again-:)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Oct 2015 13:37:54 GMT</pubDate>
    <dc:creator>siddharthpeesary</dc:creator>
    <dc:date>2015-10-15T13:37:54Z</dc:date>
    <item>
      <title>CALL EXECUTE for MACRO</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/CALL-EXECUTE-for-MACRO/m-p/229992#M54440</link>
      <description>&lt;P&gt;%macro LOOP;&lt;BR /&gt;%do i=103 %to 103/*&amp;amp;runupto*/ ;&lt;BR /&gt;proc sql noprint;&lt;BR /&gt;select SYSTEM, FILENAME, TABLE_NAME, ATTRIBUTES, JOIN_TABLE, SECOND , AMOUNT, PROGRAM, LOOKUP&lt;BR /&gt; into :SYS, :FILE , :OUTTABLE, :FIELDS, :JOINTABLE, :JOINFIELD, :CADTOTAL, :CHECKER, :LOOK&lt;BR /&gt;from DATAVALIDATION where NUMBER=103;&lt;BR /&gt;QUIT;&lt;BR /&gt;%PUT &amp;amp;FIELDS;&lt;BR /&gt;data _NULL_;&lt;BR /&gt;&lt;STRONG&gt;if &amp;amp;CHECKER='PROGRAM_CHECK' THEN &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;CALL EXECUTE(&lt;FONT color="#FF0000"&gt;%PROGRAM_CHECK&lt;/FONT&gt;(SYSTEMS=&amp;amp;SYS,FIRST=&amp;amp;FIELDS,SECOND=&amp;amp;JOINFIELD,BALANCE=&amp;amp;CADTOTAL,PARENTTABLE=&amp;amp;FILE,JOINTABLE=&amp;amp;JOINTABLE));&lt;/STRONG&gt;&lt;BR /&gt;RUN;&lt;BR /&gt;/*proc append base=SOURCE data=TABLE2 FORCE;&lt;BR /&gt;RUN;*/&lt;BR /&gt;%END;&lt;/P&gt;
&lt;P&gt;%mend;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;ERROR OCCURED&lt;/STRONG&gt;:Invalid macro name ;. It should be a valid SAS identifier no longer than 32 characters.&lt;BR /&gt;ERROR: A dummy macro will be compiled.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;question&lt;/STRONG&gt;: I have to run the macro( when the if condition is passed i have to run &lt;STRONG&gt;MACRO_CHECk)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;can anyone tell me what is the error for it and what is the correct wat to write it&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;</description>
      <pubDate>Thu, 15 Oct 2015 01:42:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/CALL-EXECUTE-for-MACRO/m-p/229992#M54440</guid>
      <dc:creator>siddharthpeesary</dc:creator>
      <dc:date>2015-10-15T01:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: CALL EXECUTE for MACRO</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/CALL-EXECUTE-for-MACRO/m-p/230001#M54442</link>
      <description>&lt;P&gt;A couple of items for starters ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does the value of &amp;amp;CHECKER_PROGRAM really include single quotes? &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Trying to add CALL EXECUTE just complicates the program without adding any functionality. &amp;nbsp;You already have a macro running. Why not get rid of the DATA step entirely:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;%if &amp;amp;CHECKER=PROGRAM_CHECK %THEN&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;%PROGRAM_CHECK&lt;/FONT&gt;(SYSTEMS=&amp;amp;SYS,FIRST=&amp;amp;FIELDS,SECOND=&amp;amp;JOINFIELD,BALA&lt;WBR /&gt;NCE=&amp;amp;CADTOTAL,PARENTTABLE=&amp;amp;FILE,JOINTABLE=&amp;amp;JOINTAB&lt;WBR /&gt;LE);&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2015 02:54:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/CALL-EXECUTE-for-MACRO/m-p/230001#M54442</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-10-15T02:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: CALL EXECUTE for MACRO</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/CALL-EXECUTE-for-MACRO/m-p/230081#M54450</link>
      <description>&lt;P&gt;Thank you so much you are a genius... actually in my table "PROGRAM_CHECK " is in character format so I thought &amp;nbsp;in &lt;STRONG&gt;if&lt;/STRONG&gt; statement it should be in quotations(i.e&amp;nbsp;%if &amp;amp;CHECKER=&lt;STRONG&gt;&amp;nbsp;'PROGRAM_CHECK'&lt;/STRONG&gt; %THEN .....) but it executed when it is &lt;STRONG&gt;not&lt;/STRONG&gt; in the &lt;STRONG&gt;Quotes ..&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;If possible can you also tell me the reason ?&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Thanks again-:)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2015 13:37:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/CALL-EXECUTE-for-MACRO/m-p/230081#M54450</guid>
      <dc:creator>siddharthpeesary</dc:creator>
      <dc:date>2015-10-15T13:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: CALL EXECUTE for MACRO</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/CALL-EXECUTE-for-MACRO/m-p/230090#M54451</link>
      <description>&lt;P&gt;DATA steps use quotes to compare strings, but macro language does not.&amp;nbsp; Here is a test you can run to become more famliar with the rules:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro test;&lt;/P&gt;
&lt;P&gt;%let name=siddarth;&lt;/P&gt;
&lt;P&gt;%if &amp;amp;name=siddarth %then %put Match #1;&lt;/P&gt;
&lt;P&gt;%if &amp;amp;name='siddarth' %then %put Match #2;&lt;/P&gt;
&lt;P&gt;%if '&amp;amp;name'='siddarth' %then %put Match #3;&lt;/P&gt;
&lt;P&gt;%if "&amp;amp;name"="siddarth" %then %put Match #4;&lt;/P&gt;
&lt;P&gt;%mend test;&lt;/P&gt;
&lt;P&gt;%test&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course, you can always invent a few more tests and experiment to become more familiar with the outcomes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the context of a DATA step, you would have to resolve macro variables and then understand what the DATA step looks like.&amp;nbsp; Resolving macro variables might generate:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if PROGRAM_CHECK = "PROGRAM_CHECK" then ..&lt;/P&gt;
&lt;P&gt;if "PROGRAM_CHECK" = "PROGRAM_CHECK" then ...&lt;/P&gt;
&lt;P&gt;if '&amp;amp;PROGRAM_CHECK" = 'PROGRAM_CHECK" then ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The rules about using quotes or not all depend on whether the proper DATA step syntax would be expecting to see quotes at that point.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2015 14:12:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/CALL-EXECUTE-for-MACRO/m-p/230090#M54451</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-10-15T14:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: CALL EXECUTE for MACRO</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/CALL-EXECUTE-for-MACRO/m-p/230095#M54452</link>
      <description>&lt;P&gt;Thank You I will try it -:)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2015 14:36:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/CALL-EXECUTE-for-MACRO/m-p/230095#M54452</guid>
      <dc:creator>siddharthpeesary</dc:creator>
      <dc:date>2015-10-15T14:36:22Z</dc:date>
    </item>
  </channel>
</rss>

