<?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: where statement with different behaviour in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/where-statement-with-different-behaviour/m-p/809847#M319378</link>
    <description>&lt;P&gt;Upadte, if I use the work directory (instead of the caslib) for both in and output file it works...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Strange, isn't it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1    %studio_hide_wrapper;
82   data CANAL_RECOBRO_MOD3;
83   set CANAL_RECOBRO_MOD2(where=
84   (( catx("_", lag_gestion, gestion) in (&amp;amp;combs.) or lag_gestion='' or recover_anything in (1 )) and
85   ( (gestion="GT" and days_channel le 7) or (gestion="CO" and days_channel le 40) or (gestion="GD" and days_channel le 90) or
85 ! (gestion="GJ" and days_channel le 15)
86   or days_channel=.)));
87   run;
NOTE: There were 183347 observations read from the data set WORK.CANAL_RECOBRO_MOD2.
      WHERE (CATX('_', lag_gestion, gestion) in ('CO_CO', 'CO_GD', 'CO_GJ', 'GD_GD', 'GD_GJ', 'GJ', 'GJ_GJ', 'GT_CO', 'GT_GD', 
      'GT_GJ', 'GT_GT') or (lag_gestion=' ') or (recover_anything=1)) and (((gestion='GT') and (days_channel&amp;lt;=7)) or 
      ((gestion='CO') and (days_channel&amp;lt;=40)) or ((gestion='GD') and (days_channel&amp;lt;=90)) or ((gestion='GJ') and (days_channel&amp;lt;=15)) 
      or (days_channel=.));
NOTE: The data set WORK.CANAL_RECOBRO_MOD3 has 183347 observations and 81 variables.
NOTE: DATA statement used (Total process time):
      real time           3.59 seconds
      cpu time            3.65 seconds
      
88   
89   %studio_hide_wrapper;
100  
101  &lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 26 Apr 2022 11:50:55 GMT</pubDate>
    <dc:creator>acordes</dc:creator>
    <dc:date>2022-04-26T11:50:55Z</dc:date>
    <item>
      <title>where statement with different behaviour</title>
      <link>https://communities.sas.com/t5/SAS-Programming/where-statement-with-different-behaviour/m-p/809846#M319377</link>
      <description>&lt;P&gt;I'm puzzled because the where clause in the proc summary works as expected but when using it a data step it doesn't execute giving the error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: Running DATA step in Cloud Analytic Services.&lt;BR /&gt;NOTE: The DATA step will run in multiple threads.&lt;BR /&gt;NOTE: Duplicate messages output by DATA step:&lt;BR /&gt;(occurred 16 times)&lt;BR /&gt;ERROR: The action stopped due to errors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options casdatalimit=all;
proc summary data=BUSIDEV.CANAL_RECOBRO_MOD2 noprint ;
where ( catx("_", lag_gestion, gestion) in (&amp;amp;combs.) or lag_gestion='' or recover_anything in (1 )) and
( (gestion="GT" and days_channel le 7) or (gestion="CO" and days_channel le 40) or (gestion="GD" and days_channel le 90) or (gestion="GJ" and days_channel le 15) 
or days_channel=.);
class lag_gestion gestion recover_anything / missing;
var days_channel;
output out=public.sumy3 mean= median= min= max= / autoname;
run;

data BUSIDEV.CANAL_RECOBRO_MOD3;
set BUSIDEV.CANAL_RECOBRO_MOD2(where=
(( catx("_", lag_gestion, gestion) in (&amp;amp;combs.) or lag_gestion='' or recover_anything in (1 )) and
( (gestion="GT" and days_channel le 7) or (gestion="CO" and days_channel le 40) or (gestion="GD" and days_channel le 90) or (gestion="GJ" and days_channel le 15) 
or days_channel=.))); 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 11:45:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/where-statement-with-different-behaviour/m-p/809846#M319377</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2022-04-26T11:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: where statement with different behaviour</title>
      <link>https://communities.sas.com/t5/SAS-Programming/where-statement-with-different-behaviour/m-p/809847#M319378</link>
      <description>&lt;P&gt;Upadte, if I use the work directory (instead of the caslib) for both in and output file it works...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Strange, isn't it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1    %studio_hide_wrapper;
82   data CANAL_RECOBRO_MOD3;
83   set CANAL_RECOBRO_MOD2(where=
84   (( catx("_", lag_gestion, gestion) in (&amp;amp;combs.) or lag_gestion='' or recover_anything in (1 )) and
85   ( (gestion="GT" and days_channel le 7) or (gestion="CO" and days_channel le 40) or (gestion="GD" and days_channel le 90) or
85 ! (gestion="GJ" and days_channel le 15)
86   or days_channel=.)));
87   run;
NOTE: There were 183347 observations read from the data set WORK.CANAL_RECOBRO_MOD2.
      WHERE (CATX('_', lag_gestion, gestion) in ('CO_CO', 'CO_GD', 'CO_GJ', 'GD_GD', 'GD_GJ', 'GJ', 'GJ_GJ', 'GT_CO', 'GT_GD', 
      'GT_GJ', 'GT_GT') or (lag_gestion=' ') or (recover_anything=1)) and (((gestion='GT') and (days_channel&amp;lt;=7)) or 
      ((gestion='CO') and (days_channel&amp;lt;=40)) or ((gestion='GD') and (days_channel&amp;lt;=90)) or ((gestion='GJ') and (days_channel&amp;lt;=15)) 
      or (days_channel=.));
NOTE: The data set WORK.CANAL_RECOBRO_MOD3 has 183347 observations and 81 variables.
NOTE: DATA statement used (Total process time):
      real time           3.59 seconds
      cpu time            3.65 seconds
      
88   
89   %studio_hide_wrapper;
100  
101  &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Apr 2022 11:50:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/where-statement-with-different-behaviour/m-p/809847#M319378</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2022-04-26T11:50:55Z</dc:date>
    </item>
  </channel>
</rss>

