<?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: optimisation of the sas table before reporting in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/optimisation-of-the-sas-table-before-reporting/m-p/553484#M16968</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The SAS dataset is the same form as the one of the image (top). It’s the result of transpose and multiple merges.&lt;BR /&gt;The macro offers many possibilities (according to the settings) and requires an important data step at the end to show results...&lt;BR /&gt;It allows to obtain uni &amp;amp; bivariate results for continuous and categorical variables, to get RR/OR etc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i.e. %analysis(in=, out=, dep_var=, cont_vars=, class_vars=, silent=0, stddiff=2, RR=1, side=_vars_);&lt;BR /&gt;&lt;BR /&gt;Mic&lt;/P&gt;</description>
    <pubDate>Wed, 24 Apr 2019 01:29:31 GMT</pubDate>
    <dc:creator>Mic35</dc:creator>
    <dc:date>2019-04-24T01:29:31Z</dc:date>
    <item>
      <title>optimisation of the sas table before reporting</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/optimisation-of-the-sas-table-before-reporting/m-p/553456#M16961</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;After doing a lot of research, I would like a quick help please....&lt;/P&gt;&lt;P&gt;I am looking to optimise my table for reporting purposes (please see attachment).&amp;nbsp;&lt;BR /&gt;The aim is to lighten the table of duplicate data.&amp;nbsp;&lt;BR /&gt;I tried different solutions with data step, without success.&lt;BR /&gt;My problem can be fixed?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The table&amp;nbsp;is the result of a succession of macros and&amp;nbsp;it's difficult to solve it before the output.&amp;nbsp;&lt;BR /&gt;Modifications are easy in excel on a variable but when there are many of them,&amp;nbsp;it's nicer to automate and it reduces the risk of error.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I appreciate your help and tips.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mic&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Capture d’écran 2019-04-24 à 00.05.57.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/28949iF20565A262EA4274/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture d’écran 2019-04-24 à 00.05.57.jpg" alt="Capture d’écran 2019-04-24 à 00.05.57.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 22:32:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/optimisation-of-the-sas-table-before-reporting/m-p/553456#M16961</guid>
      <dc:creator>Mic35</dc:creator>
      <dc:date>2019-04-23T22:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: optimisation of the sas table before reporting</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/optimisation-of-the-sas-table-before-reporting/m-p/553459#M16962</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How are you creating that result, and what format is it in?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a SAS dataset that we could work with, or do your macros write directly to a report. If there's a SAS dataset, what does it look like?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you describe the process of creating it in a bit more detail?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can think of a couple of approaches, but more information is needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 22:48:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/optimisation-of-the-sas-table-before-reporting/m-p/553459#M16962</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2019-04-23T22:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: optimisation of the sas table before reporting</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/optimisation-of-the-sas-table-before-reporting/m-p/553484#M16968</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The SAS dataset is the same form as the one of the image (top). It’s the result of transpose and multiple merges.&lt;BR /&gt;The macro offers many possibilities (according to the settings) and requires an important data step at the end to show results...&lt;BR /&gt;It allows to obtain uni &amp;amp; bivariate results for continuous and categorical variables, to get RR/OR etc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i.e. %analysis(in=, out=, dep_var=, cont_vars=, class_vars=, silent=0, stddiff=2, RR=1, side=_vars_);&lt;BR /&gt;&lt;BR /&gt;Mic&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 01:29:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/optimisation-of-the-sas-table-before-reporting/m-p/553484#M16968</guid>
      <dc:creator>Mic35</dc:creator>
      <dc:date>2019-04-24T01:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: optimisation of the sas table before reporting</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/optimisation-of-the-sas-table-before-reporting/m-p/553514#M16971</link>
      <description>&lt;P&gt;How about adding a data step such as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
array _field name_variable RR;
do i = 1 to dim(_field);
    if _field{i} = lag(_field{i}) then _field{i} = " ";
    end;
drop i;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(untested)&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 03:26:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/optimisation-of-the-sas-table-before-reporting/m-p/553514#M16971</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-04-24T03:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: optimisation of the sas table before reporting</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/optimisation-of-the-sas-table-before-reporting/m-p/553561#M16973</link>
      <description>&lt;P&gt;A big thank you to you PG.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Your code is very good.&lt;/P&gt;&lt;P&gt;With variables that appear in some cases and not in others (i.e. OR or RR), I added the code below to complete.&lt;BR /&gt;Now everything is perfect.&lt;BR /&gt;Thank you again.&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;ODS OUTPUT nLevels =work.nlevels;

PROC FREQ DATA= &amp;amp;out. NLEVELS ;
	TABLE _ALL_ / NOPRINT ;
RUN ;
PROC SQL NOPRINT ;
	SELECT STRIP(tableVar) INTO : listeDrop SEPARATED BY ","
	FROM  work.nlevesl
	WHERE NnonMissLevels = 0
	;
	ALTER TABLE  &amp;amp;out. DROP &amp;amp;listeDrop ;
QUIT ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Apr 2019 09:15:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/optimisation-of-the-sas-table-before-reporting/m-p/553561#M16973</guid>
      <dc:creator>Mic35</dc:creator>
      <dc:date>2019-04-24T09:15:16Z</dc:date>
    </item>
  </channel>
</rss>

