<?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: Macros in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macros/m-p/478249#M123319</link>
    <description>&lt;P&gt;Is this a homework assignment? Because this thread works on almost the exact same data and the exact same variable names.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/How-to-filter-a-dataset-with-an-IF-condition/m-p/478211#M123291" target="_blank"&gt;https://communities.sas.com/t5/Base-SAS-Programming/How-to-filter-a-dataset-with-an-IF-condition/m-p/478211#M123291&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But, you don't need macros to do this. Assign a random number to each group, sort and then take the top 5 (or top 10, or top 20) etc to randomly select.&lt;/P&gt;</description>
    <pubDate>Sun, 15 Jul 2018 23:52:35 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2018-07-15T23:52:35Z</dc:date>
    <item>
      <title>Macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macros/m-p/478248#M123318</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having difficultly achieving the following objective when given an excel data file. I have started the code below, but cannot produce an output.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Objective using Macros:&amp;nbsp;&lt;/P&gt;&lt;P&gt;From each of the 5 clinics (inst_num) randomly select 5 AML patients, 10 CML patients, 20 ALL patients, and 5 CLL patients (leu_type). If there are less than 5 AML patients then select all of them, if there are less than 10 CML patients then select all of them, if there are less than 20 ALL patients then select all of them, and if there are 5 CLL patients then select all of them.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then find cross-tabulation of Leu_type and inst_num. Additionally, print final dataset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Jul 2018 23:53:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macros/m-p/478248#M123318</guid>
      <dc:creator>cpowell13</dc:creator>
      <dc:date>2018-07-15T23:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: Macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macros/m-p/478249#M123319</link>
      <description>&lt;P&gt;Is this a homework assignment? Because this thread works on almost the exact same data and the exact same variable names.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/How-to-filter-a-dataset-with-an-IF-condition/m-p/478211#M123291" target="_blank"&gt;https://communities.sas.com/t5/Base-SAS-Programming/How-to-filter-a-dataset-with-an-IF-condition/m-p/478211#M123291&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But, you don't need macros to do this. Assign a random number to each group, sort and then take the top 5 (or top 10, or top 20) etc to randomly select.&lt;/P&gt;</description>
      <pubDate>Sun, 15 Jul 2018 23:52:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macros/m-p/478249#M123319</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-07-15T23:52:35Z</dc:date>
    </item>
  </channel>
</rss>

