<?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: Creating Dynamic Classes in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-Dynamic-Classes/m-p/490682#M128444</link>
    <description>&lt;P&gt;Legend .... Thanks Chris, that's perfect&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... I don't know why, but it won't let me like your post, but consider it liked&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Aug 2018 00:13:02 GMT</pubDate>
    <dc:creator>NeilGiles</dc:creator>
    <dc:date>2018-08-29T00:13:02Z</dc:date>
    <item>
      <title>Creating Dynamic Classes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-Dynamic-Classes/m-p/490665#M128433</link>
      <description>&lt;P&gt;I've read the paper here&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings11/087-2011.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings11/087-2011.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;on how to create classes so that you can force&amp;nbsp;PROC TABULATE to print columns and rows that have zero-totals.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The paper shows an example of setting up a class using this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA CLASS;
&amp;nbsp; &amp;nbsp; &amp;nbsp;DO SVC=’A’,’F’,’N’,’M’;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DO PG=’E’,’O’;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OUTPUT;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;END;
END;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;My question is: is it possible to have this class created dynamically using two single-column&amp;nbsp;tables, one containing the possible values of SVC, the other&amp;nbsp;containing the possible values of PG.&amp;nbsp; These two tables with values of SVC and PG could be generated at run time from the data using&amp;nbsp;PROC SORT on the main data table to get a list of unique values of each variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working in an area where things change at a million miles an hour, and it would be nice if the tables produced in monthly reporting used classes that were automatically updated within the program at run-time, rather than having to be hard-coded each time there is a change.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help appreciated and thanks in advance.&amp;nbsp; I have googled to try and find a paper or anything on this, but so far no leads.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2018 22:51:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-Dynamic-Classes/m-p/490665#M128433</guid>
      <dc:creator>NeilGiles</dc:creator>
      <dc:date>2018-08-28T22:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Dynamic Classes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-Dynamic-Classes/m-p/490677#M128440</link>
      <description>&lt;P&gt;Like this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql; 
  create table CLASSDATA as
  select SVC, PG
  from TAB_SVC,TAB_PG;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or even this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql; 
  create table CLASSDATA as
  select SVC, PG
  from (select unique SVC from MAINTABLE)
      ,(select unique PG  from MAINTABLE);
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2018 23:51:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-Dynamic-Classes/m-p/490677#M128440</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-08-28T23:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Dynamic Classes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-Dynamic-Classes/m-p/490682#M128444</link>
      <description>&lt;P&gt;Legend .... Thanks Chris, that's perfect&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... I don't know why, but it won't let me like your post, but consider it liked&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 00:13:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-Dynamic-Classes/m-p/490682#M128444</guid>
      <dc:creator>NeilGiles</dc:creator>
      <dc:date>2018-08-29T00:13:02Z</dc:date>
    </item>
  </channel>
</rss>

