<?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: Does classdata need types statement? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Does-classdata-need-types-statement/m-p/760397#M240450</link>
    <description>&lt;P&gt;Please post the complete log from that step, and inspect your CLASSDATA1 dataset.&lt;/P&gt;
&lt;P&gt;Also consider the impact of using format $VARSIX.&lt;/P&gt;</description>
    <pubDate>Mon, 09 Aug 2021 15:31:40 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2021-08-09T15:31:40Z</dc:date>
    <item>
      <title>Does classdata need types statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Does-classdata-need-types-statement/m-p/760395#M240449</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use classdata to limit which combinations of variables should be processed by proc means. Unfortunately, it appears that it has no effect - I am getting all the combinations including totals despite using classdata exclusive:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=foo classdata=classdata1 exclusive;
class var1 var2 var3 var4 var5 var6;
format var6 $varsix.;
output out=procmeans(drop=_TYPE_ _FREQ_) n=count;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 15:21:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Does-classdata-need-types-statement/m-p/760395#M240449</guid>
      <dc:creator>js5</dc:creator>
      <dc:date>2021-08-09T15:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Does classdata need types statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Does-classdata-need-types-statement/m-p/760397#M240450</link>
      <description>&lt;P&gt;Please post the complete log from that step, and inspect your CLASSDATA1 dataset.&lt;/P&gt;
&lt;P&gt;Also consider the impact of using format $VARSIX.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 15:31:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Does-classdata-need-types-statement/m-p/760397#M240450</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-08-09T15:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Does classdata need types statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Does-classdata-need-types-statement/m-p/760555#M240505</link>
      <description>&lt;P&gt;I have managed to reproduce this with sashelp.cars:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
	value hp
		low-&amp;lt;150 = "low"
		150-high = "high";

proc means data=sashelp.cars noprint;
	class Origin Make Type DriveTrain;
	types Origin*Make*Type*DriveTrain Origin*Make*DriveTrain Origin*DriveTrain;
	output out=procmeans1(keep=Origin Make Type DriveTrain) n=count;
run;

proc sort data=procmeans1;
	by Origin Make Type DriveTrain;
run;

proc means data=sashelp.cars noprint completetypes;
	class Origin Make Type DriveTrain Horsepower;
	format Horsepower hp.;
	output out=procmeans2(keep=Origin Make Type DriveTrain Horsepower) n=count;
run;

proc sort data=procmeans2;
	by Origin Make Type DriveTrain Horsepower;
run;

data classdata1;
	merge procmeans1(in=cd) procmeans2(where=(not missing(Horsepower)));
	by Origin Make Type DriveTrain;

	if cd;
run;

proc means data=sashelp.cars noprint classdata=classdata1 exclusive;
	class Origin Make Type DriveTrain Horsepower;
	format Horsepower hp.;
	var Horsepower;
	output out=procmeans n=count;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What I need is a dataset like classdata1 with counts for each horsepower pool calculated, even if the count is 0 (I need to feed this dataset to proc freq later). In other words, the classdata1 dataset with count column in it.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 07:53:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Does-classdata-need-types-statement/m-p/760555#M240505</guid>
      <dc:creator>js5</dc:creator>
      <dc:date>2021-08-10T07:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Does classdata need types statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Does-classdata-need-types-statement/m-p/760558#M240506</link>
      <description>&lt;P&gt;Turns out I can achieve what I need by just not dropping the counts from procmeans2 and using classdata1 as my final dataset. Still, is classdata doing what it is supposed to in my original code?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 08:17:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Does-classdata-need-types-statement/m-p/760558#M240506</guid>
      <dc:creator>js5</dc:creator>
      <dc:date>2021-08-10T08:17:05Z</dc:date>
    </item>
  </channel>
</rss>

