<?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 reusable macros in SAS Health and Life Sciences</title>
    <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/reusable-macros/m-p/4401#M369</link>
    <description>where exactly macros are reused please give me example</description>
    <pubDate>Wed, 29 Aug 2007 17:44:27 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2007-08-29T17:44:27Z</dc:date>
    <item>
      <title>reusable macros</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/reusable-macros/m-p/4401#M369</link>
      <description>where exactly macros are reused please give me example</description>
      <pubDate>Wed, 29 Aug 2007 17:44:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/reusable-macros/m-p/4401#M369</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-08-29T17:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: reusable macros</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/reusable-macros/m-p/4402#M370</link>
      <description>Here's an example of DEFINING a macro program:&lt;BR /&gt;
[pre]&lt;BR /&gt;
options mprint mlogic symbolgen;&lt;BR /&gt;
&lt;BR /&gt;
%macro prtds(dsn=, limit=10);&lt;BR /&gt;
proc print data=&amp;amp;dsn (obs=&amp;amp;limit);&lt;BR /&gt;
  title "Print of &amp;amp;limit rows in &amp;amp;dsn";&lt;BR /&gt;
run;&lt;BR /&gt;
%mend prtds;&lt;BR /&gt;
&lt;BR /&gt;
** now look in WORK.SASMACR catalog for the session compiled macro;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
Here's how the macro program would be reused:&lt;BR /&gt;
[pre]&lt;BR /&gt;
** then reuse the %PRTDS macro program;&lt;BR /&gt;
  &lt;BR /&gt;
%prtds(dsn=sashelp.class, limit=5);&lt;BR /&gt;
run;&lt;BR /&gt;
  &lt;BR /&gt;
%prtds(dsn=sashelp.prdsale, limit=20);&lt;BR /&gt;
run;&lt;BR /&gt;
  &lt;BR /&gt;
%prtds(dsn=sashelp.shoes, limit=2);&lt;BR /&gt;
run;&lt;BR /&gt;
   &lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
This book is a good resource&lt;BR /&gt;
SAS Programming in the Pharmaceutical Industry by Jack Shostak&lt;BR /&gt;
&lt;BR /&gt;
Also, you can go to Google and type this search string into the Google Search box:&lt;BR /&gt;
Macro site:www.lexjansen.com/pharmasug&lt;BR /&gt;
&lt;BR /&gt;
The resulting hits will be of invaluable help. Of course, referring to the SAS Macro facility documentation will help answer your macro questions, too.&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 29 Aug 2007 17:58:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/reusable-macros/m-p/4402#M370</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-08-29T17:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: reusable macros</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/reusable-macros/m-p/4403#M371</link>
      <description>one question:&lt;BR /&gt;
&lt;BR /&gt;
what's 'dsn' mean here? &lt;BR /&gt;
&lt;BR /&gt;
i always use 'table', 'tbl', not the standard syntax in SAS &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; thanks!&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- read SAS Programming I, II, very resourceful for SAS beginners.

Message was edited by: David@CRO</description>
      <pubDate>Thu, 13 Sep 2007 03:05:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/reusable-macros/m-p/4403#M371</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-09-13T03:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: reusable macros</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/reusable-macros/m-p/4404#M372</link>
      <description>In my examples, LIB generally stands for SAS libname and DSN generally stands for &lt;B&gt;D&lt;/B&gt;ata &lt;B&gt;S&lt;/B&gt;et &lt;B&gt;N&lt;/B&gt;ame. A SAS dataset is the equivalent of what you call a TABLE.&lt;BR /&gt;
 &lt;BR /&gt;
As far as jargon...I like this example from the Programming I course which shows how the various terms relate to each other (from the different "ages" of Data Processing):&lt;BR /&gt;
[pre]&lt;BR /&gt;
"mainframe"   SAS         Relational DB&lt;BR /&gt;
  term        term          or SQL term&lt;BR /&gt;
  file       data set        table &lt;BR /&gt;
 record      observation     row&lt;BR /&gt;
 field       variable        col&lt;BR /&gt;
[/pre]&lt;BR /&gt;
   &lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 13 Sep 2007 06:15:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/reusable-macros/m-p/4404#M372</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-09-13T06:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: reusable macros</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/reusable-macros/m-p/4405#M373</link>
      <description>Thank you very much, Cynthia!&lt;BR /&gt;
&lt;BR /&gt;
I know LIB/LIBNAME, but I alway read DSN, and no idea what's that mean &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
I like explanation in SAS Prog1, good example for newbies and those moving from other domain.</description>
      <pubDate>Thu, 13 Sep 2007 13:33:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/reusable-macros/m-p/4405#M373</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-09-13T13:33:53Z</dc:date>
    </item>
  </channel>
</rss>

