<?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: Need some help with printing macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Need-some-help-with-printing-macro/m-p/71386#M15463</link>
    <description>I'm not sure I get what your problem / question is....</description>
    <pubDate>Thu, 02 Jun 2011 14:31:13 GMT</pubDate>
    <dc:creator>PatrickG</dc:creator>
    <dc:date>2011-06-02T14:31:13Z</dc:date>
    <item>
      <title>Need some help with printing macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-some-help-with-printing-macro/m-p/71384#M15461</link>
      <description>%Macro EDC(Type,id);&lt;BR /&gt;
data out_table;&lt;BR /&gt;
	set RF300L3.edc_thick;&lt;BR /&gt;
	where col_ins_id = &amp;amp;id;&lt;BR /&gt;
run;&lt;BR /&gt;
%mend;&lt;BR /&gt;
&lt;BR /&gt;
%macro Html;&lt;BR /&gt;
ods listing close;&lt;BR /&gt;
ods html file="/imec/other/imecweb/osp/sp/files/HTML.html" data _null_;&lt;BR /&gt;
set all_append_and_edc_and_vars;&lt;BR /&gt;
 if type = 'THICK' then call execute('%EDC(THICK,col_ins_id)');&lt;BR /&gt;
 proc print data=out_table;run;&lt;BR /&gt;
&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
ods html close;&lt;BR /&gt;
%mend;&lt;BR /&gt;
%Html;&lt;BR /&gt;
&lt;BR /&gt;
the problem is the id i have to pass&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: Filipvdr

Message was edited by: Filipvdr</description>
      <pubDate>Tue, 31 May 2011 10:04:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-some-help-with-printing-macro/m-p/71384#M15461</guid>
      <dc:creator>Filipvdr</dc:creator>
      <dc:date>2011-05-31T10:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with printing macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-some-help-with-printing-macro/m-p/71385#M15462</link>
      <description>If "col_ins_id" is a dataset variable, then using cat&lt;S&gt; can help.&lt;BR /&gt;
&lt;BR /&gt;
[pre]call execute(cats('%EDC(THICK,' col_ins_id, ')');[/pre]&lt;/S&gt;</description>
      <pubDate>Tue, 31 May 2011 11:20:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-some-help-with-printing-macro/m-p/71385#M15462</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2011-05-31T11:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with printing macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-some-help-with-printing-macro/m-p/71386#M15463</link>
      <description>I'm not sure I get what your problem / question is....</description>
      <pubDate>Thu, 02 Jun 2011 14:31:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-some-help-with-printing-macro/m-p/71386#M15463</guid>
      <dc:creator>PatrickG</dc:creator>
      <dc:date>2011-06-02T14:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with printing macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-some-help-with-printing-macro/m-p/71387#M15464</link>
      <description>&amp;gt; %Macro EDC(Type,id);&lt;BR /&gt;
&amp;gt; data out_table;&lt;BR /&gt;
&amp;gt; 	set RF300L3.edc_thick;&lt;BR /&gt;
&amp;gt; 	where col_ins_id = &amp;amp;id;&lt;BR /&gt;
&amp;gt; run;&lt;BR /&gt;
&amp;gt; %mend;&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; %macro Html;&lt;BR /&gt;
&amp;gt; ods listing close;&lt;BR /&gt;
&amp;gt; ods html&lt;BR /&gt;
&amp;gt; file="/imec/other/imecweb/osp/sp/files/HTML.html"&lt;BR /&gt;
&lt;BR /&gt;
Missing semicolon to end ODS HTML statement;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; data _null_;&lt;BR /&gt;
&amp;gt; set all_append_and_edc_and_vars;&lt;BR /&gt;
&amp;gt; if type = 'THICK' then call&lt;BR /&gt;
&lt;BR /&gt;
This may not work as EDC calls a data step and can not nest datasteps.&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;  execute('%EDC(THICK,col_ins_id)');&lt;BR /&gt;
&amp;gt; proc print data=out_table;run;&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; run;&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; ods html close;&lt;BR /&gt;
&amp;gt; %mend;&lt;BR /&gt;
&amp;gt; %Html;&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; the problem is the id i have to pass&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Message was edited by: Filipvdr&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Message was edited by: Filipvdr</description>
      <pubDate>Thu, 02 Jun 2011 18:02:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-some-help-with-printing-macro/m-p/71387#M15464</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2011-06-02T18:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with printing macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-some-help-with-printing-macro/m-p/71388#M15465</link>
      <description>so there is no solution to do this kind of working with macro and datasets to print?</description>
      <pubDate>Tue, 14 Jun 2011 06:36:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-some-help-with-printing-macro/m-p/71388#M15465</guid>
      <dc:creator>Filipvdr</dc:creator>
      <dc:date>2011-06-14T06:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with printing macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-some-help-with-printing-macro/m-p/71389#M15466</link>
      <description>First, the ODS statement is missing a trailing semi-colon as was mentioned.&lt;BR /&gt;
Second, the DATA step that invokes the CALL EXECUTE must have a RUN;   statement to terminate / compile the code before invoking the PROC PRINT that follows.&lt;BR /&gt;
&lt;BR /&gt;
Recommend the OP add the SAS statement below so that the max amount of diagnostic info is generated to the SAS log, and then if there are still problems, REPLY to this post with a COPY/PASTE of the entire SAS-generated log output:&lt;BR /&gt;
&lt;BR /&gt;
OPTIONS SOURCE SOURCE2 MACROGEN SYMBOLGEN MPRINT /* MLOGIC */;&lt;BR /&gt;
&lt;BR /&gt;
Also, if there are problems completing a forum post, review this companion forum post (and bookmark it for future reference) with posting guidelines:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=27609" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=27609&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument, this topic / post:&lt;BR /&gt;
&lt;BR /&gt;
call execute run statement site:sas.com</description>
      <pubDate>Tue, 14 Jun 2011 10:59:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-some-help-with-printing-macro/m-p/71389#M15466</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2011-06-14T10:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with printing macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-some-help-with-printing-macro/m-p/71390#M15467</link>
      <description>You should add 'proc print ' into your first macro EDCT. Such as&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
%Macro EDC(Type,id);&lt;BR /&gt;
data out_table;&lt;BR /&gt;
set RF300L3.edc_thick;&lt;BR /&gt;
where col_ins_id = &amp;amp;id;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;B&gt;proc print data=out_table;run;&lt;/B&gt;&lt;BR /&gt;
%mend;&lt;BR /&gt;
&lt;BR /&gt;
%macro Html;&lt;BR /&gt;
ods listing close;&lt;BR /&gt;
ods html file="/imec/other/imecweb/osp/sp/files/HTML.html" data _null_;&lt;BR /&gt;
set all_append_and_edc_and_vars;&lt;BR /&gt;
if type = 'THICK' then call execute('%EDC(THICK,col_ins_id)');&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
ods html close;&lt;BR /&gt;
%mend;&lt;BR /&gt;
%Html;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Because the code generated by call execute is executed after your data _null_;&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Fri, 17 Jun 2011 06:17:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-some-help-with-printing-macro/m-p/71390#M15467</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-06-17T06:17:22Z</dc:date>
    </item>
  </channel>
</rss>

