<?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: How to skip data step processing (output if the condition met) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-data-step-processing-output-if-the-condition-met/m-p/828866#M327449</link>
    <description>&lt;P&gt;Thank you for your answer&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I applied the code to my program, but I see some issues. Hope you can help me to figure it out.&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;%macro prcdth();
%let flagone=0; %let flagtwo=0;
data _null_;
    set dd2;
    if ddtestcd='PRCDTH' then do; 
        call symputx('flagone',1);
        stop;
    end;
run;
data _null_;
    set dd2;
    if  DDTESTCD="CANDUSO" and DDORRES="UNEQUIVOCALLY DUE TO DISEASE UNDER STUDY" then do; 
        call symputx('flagtwo',1);
        stop;
    end;
run;

%if &amp;amp;flagone.=1 %then %do;    /* Create data set with zero rows */
    data dd3_1;
        set dd2(obs=0);
    run;
%end;
%else %if &amp;amp;flagtwo.=1 %then %do;
    data dd3_2;
	set dd2;
	 
 	AVALC = "CANCER";	
	
   aval=.;
   PARAMCD="PRCDTH";
   AVALCAT1='NON-CARDIOVASCULAR CAUSE';
        if AVALCAT1='CARDIOVASCULAR CAUSE'     then AVALCA1N=1;
   else if AVALCAT1='NON-CARDIOVASCULAR CAUSE' then AVALCA1N=2;
   output;
run;
%end;
%else %if &amp;amp;flagone.^=1 and &amp;amp;flagtwo.^=1 %then %do;
data dd3_3;
	set dd2;

	if DTHFL='Y'  then do;
	
	AVALC="Unknown";
	 aval=.;
   PARAMCD="PRCDTH";
   AVALCAT1=DDSCAT;
        if AVALCAT1='CARDIOVASCULAR CAUSE'     then AVALCA1N=1;
   else if AVALCAT1='NON-CARDIOVASCULAR CAUSE' then AVALCA1N=2;
output;
end;
run;
%end;
%mend prcdth;
%prcdth();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 61         
 62         
 63         %macro prcdth();
 64         %let flagone=0; %let flagtwo=0;
 65         data _null_;
 66             set dd2;
 67             if ddtestcd='PRCDTH' then do;
 68                 call symputx('flagone',1);
 69                 stop;
 70             end;
 71         run;
 72         data _null_;
 73             set dd2;
 74             if  DDTESTCD="CANDUSO" and DDORRES="UNEQUIVOCALLY DUE TO DISEASE UNDER STUDY" then do;
 75                 call symputx('flagtwo',1);
 76                 stop;
 77             end;
 78         run;
 79         
 80         %if &amp;amp;flagone.=1 %then %do;    /* Create data set with zero rows */
 81             data dd3_1;
 82                 set dd2(obs=0);
 83             run;
 84         %end;
 85         %else %if &amp;amp;flagtwo.=1 %then %do;
 86             data dd3_2;
 87         set dd2;
 88         
 89          AVALC = "CANCER";
 90         
 91            aval=.;
 92            PARAMCD="PRCDTH";
 93            AVALCAT1='NON-CARDIOVASCULAR CAUSE';
 94                 if AVALCAT1='CARDIOVASCULAR CAUSE'     then AVALCA1N=1;
 95            else if AVALCAT1='NON-CARDIOVASCULAR CAUSE' then AVALCA1N=2;
 96            output;
 97         run;
 98         %end;
 99         %else %if &amp;amp;flagone.^=1 and &amp;amp;flagtwo.^=1 %then %do;
 100        data dd3_3;
 101        set dd2;
 102        
 103        if DTHFL='Y'  then do;
 104        
 105        AVALC="Unknown";
 106         aval=.;
 107           PARAMCD="PRCDTH";
 108           AVALCAT1=DDSCAT;
 109                if AVALCAT1='CARDIOVASCULAR CAUSE'     then AVALCA1N=1;
 110           else if AVALCAT1='NON-CARDIOVASCULAR CAUSE' then AVALCA1N=2;
 111        output;
 112        end;
 113        run;
 114        %end;
 115        %mend prcdth;
 116        %prcdth();
 MPRINT(PRCDTH):   data _null_;
 MPRINT(PRCDTH):   set dd2;
 MPRINT(PRCDTH):   if ddtestcd='PRCDTH' then do;
 MPRINT(PRCDTH):   call symputx('flagone',1);
 MPRINT(PRCDTH):   stop;
 MPRINT(PRCDTH):   end;
 MPRINT(PRCDTH):   run;
 
 NOTE: There were 15 observations read from the data set WORK.DD2.
 NOTE: DATA statement used (Total process time):
       real time           0.01 seconds
       cpu time            0.01 seconds
       
 
 MPRINT(PRCDTH):   data _null_;
 MPRINT(PRCDTH):   set dd2;
 MPRINT(PRCDTH):   if DDTESTCD="CANDUSO" and DDORRES="UNEQUIVOCALLY DUE TO DISEASE UNDER STUDY" then do;
 MPRINT(PRCDTH):   call symputx('flagtwo',1);
 MPRINT(PRCDTH):   stop;
 MPRINT(PRCDTH):   end;
 MPRINT(PRCDTH):   run;
 
 NOTE: There were 42 observations read from the data set WORK.DD2.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.01 seconds
       
 
 MPRINT(PRCDTH):   data dd3_1;
 MPRINT(PRCDTH):   set dd2(obs=0);
 MPRINT(PRCDTH):   run;
 
 NOTE: There were 0 observations read from the data set WORK.DD2.
 NOTE: The data set WORK.DD3_1 has 0 observations and 47 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 117        
 118        OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 131    &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;So I have added two additional derivations and &amp;amp;flagtwo macro variable.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The second derivation&lt;/STRONG&gt; (dd3_2 dataset)&amp;nbsp;I&amp;nbsp;need&amp;nbsp;to execute when the &amp;amp;flagtwo is 1 and after the &amp;amp;flagone else condition (i.e there is no&amp;nbsp;ddtestcd='PRCDTH' in dd2 dataset, but there is an observation satisfying&amp;nbsp; DDTESTCD="CANDUSO" and DDORRES="UNEQUIVOCALLY DUE TO DISEASE UNDER STUDY" condition).&lt;BR /&gt;&lt;STRONG&gt;The third derivation&lt;/STRONG&gt; (dd3_3 dataset)&amp;nbsp; I&amp;nbsp;need&amp;nbsp;to execute when the &amp;amp;flagone is ^=1 and the &amp;amp;flagtwo is ^=1, after the &amp;amp;flagtwo else condition (i.e.&amp;nbsp;there is no&amp;nbsp;ddtestcd='PRCDTH' in dd2 dataset and also there is no observation satisfying&amp;nbsp; DDTESTCD="CANDUSO" and DDORRES="UNEQUIVOCALLY DUE TO DISEASE UNDER STUDY" condition, but there is an observation satisfying&amp;nbsp;DTHFL='Y' condition).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Before %prcdth macro execution the input dataset dd2 has 1170 observations(checked manually).&lt;BR /&gt;But during the macro execution it takes only 15 and 42 observations, and dd3_2 and dd3_3 datasets are not created.&lt;/P&gt;
&lt;P&gt;Could you please take a look and give some advice on what need to be adjusted, I have attached the log as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
    <pubDate>Tue, 16 Aug 2022 14:56:13 GMT</pubDate>
    <dc:creator>webart999ARM</dc:creator>
    <dc:date>2022-08-16T14:56:13Z</dc:date>
    <item>
      <title>How to skip data step processing (output if the condition met)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-data-step-processing-output-if-the-condition-met/m-p/828812#M327420</link>
      <description>&lt;P&gt;Hello everybody.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Today I faced with an issue which solution seems pretty straightforward, but I couldn't find any correct approach for it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have the below data&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="webart999ARM_3-1660649602307.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/74458i5F26E6631D1924B1/image-size/large?v=v2&amp;amp;px=999" role="button" title="webart999ARM_3-1660649602307.png" alt="webart999ARM_3-1660649602307.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I want to do is following.&lt;/P&gt;
&lt;P&gt;1 - To output an additional raw (with certain new variables) if my (have) dataset &lt;EM&gt;dd2&lt;/EM&gt; does &lt;STRONG&gt;not&lt;/STRONG&gt; contain observation with &lt;STRONG&gt;DDTESTCD='PRCDTH'&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;2 -&lt;/EM&gt; And in case if it contains&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;DDTESTCD='PRCDTH'&lt;EM&gt;, &lt;/EM&gt;&lt;/STRONG&gt;then I want a new &lt;EM&gt;dd3&lt;/EM&gt; dataset with 0 observation,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind Regards&lt;/P&gt;
&lt;P&gt;Artur&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 11:38:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-skip-data-step-processing-output-if-the-condition-met/m-p/828812#M327420</guid>
      <dc:creator>webart999ARM</dc:creator>
      <dc:date>2022-08-16T11:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip data step processing (output if the condition met)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-data-step-processing-output-if-the-condition-met/m-p/828814#M327421</link>
      <description>&lt;P&gt;You can do this via a macro variable which I have named &amp;amp;FLAG ... something like this outline of the code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let flag=0;
data _null_;
    set dd2;
    if ddtestcd='PRCDTH' then do; 
        call symputx('flag',1);
        stop;
    end;
run;

%if &amp;amp;flag=1 %then %do;
    /* Create data set with zero rows */
    data dd3;
        set dd2(obs=0);
    run;
%end;
%else %do;
    /* Some other data step or PROC code, I'm not sure what you want here */
%end;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Aug 2022 11:54:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-skip-data-step-processing-output-if-the-condition-met/m-p/828814#M327421</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-08-16T11:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip data step processing (output if the condition met)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-data-step-processing-output-if-the-condition-met/m-p/828866#M327449</link>
      <description>&lt;P&gt;Thank you for your answer&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I applied the code to my program, but I see some issues. Hope you can help me to figure it out.&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;%macro prcdth();
%let flagone=0; %let flagtwo=0;
data _null_;
    set dd2;
    if ddtestcd='PRCDTH' then do; 
        call symputx('flagone',1);
        stop;
    end;
run;
data _null_;
    set dd2;
    if  DDTESTCD="CANDUSO" and DDORRES="UNEQUIVOCALLY DUE TO DISEASE UNDER STUDY" then do; 
        call symputx('flagtwo',1);
        stop;
    end;
run;

%if &amp;amp;flagone.=1 %then %do;    /* Create data set with zero rows */
    data dd3_1;
        set dd2(obs=0);
    run;
%end;
%else %if &amp;amp;flagtwo.=1 %then %do;
    data dd3_2;
	set dd2;
	 
 	AVALC = "CANCER";	
	
   aval=.;
   PARAMCD="PRCDTH";
   AVALCAT1='NON-CARDIOVASCULAR CAUSE';
        if AVALCAT1='CARDIOVASCULAR CAUSE'     then AVALCA1N=1;
   else if AVALCAT1='NON-CARDIOVASCULAR CAUSE' then AVALCA1N=2;
   output;
run;
%end;
%else %if &amp;amp;flagone.^=1 and &amp;amp;flagtwo.^=1 %then %do;
data dd3_3;
	set dd2;

	if DTHFL='Y'  then do;
	
	AVALC="Unknown";
	 aval=.;
   PARAMCD="PRCDTH";
   AVALCAT1=DDSCAT;
        if AVALCAT1='CARDIOVASCULAR CAUSE'     then AVALCA1N=1;
   else if AVALCAT1='NON-CARDIOVASCULAR CAUSE' then AVALCA1N=2;
output;
end;
run;
%end;
%mend prcdth;
%prcdth();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 61         
 62         
 63         %macro prcdth();
 64         %let flagone=0; %let flagtwo=0;
 65         data _null_;
 66             set dd2;
 67             if ddtestcd='PRCDTH' then do;
 68                 call symputx('flagone',1);
 69                 stop;
 70             end;
 71         run;
 72         data _null_;
 73             set dd2;
 74             if  DDTESTCD="CANDUSO" and DDORRES="UNEQUIVOCALLY DUE TO DISEASE UNDER STUDY" then do;
 75                 call symputx('flagtwo',1);
 76                 stop;
 77             end;
 78         run;
 79         
 80         %if &amp;amp;flagone.=1 %then %do;    /* Create data set with zero rows */
 81             data dd3_1;
 82                 set dd2(obs=0);
 83             run;
 84         %end;
 85         %else %if &amp;amp;flagtwo.=1 %then %do;
 86             data dd3_2;
 87         set dd2;
 88         
 89          AVALC = "CANCER";
 90         
 91            aval=.;
 92            PARAMCD="PRCDTH";
 93            AVALCAT1='NON-CARDIOVASCULAR CAUSE';
 94                 if AVALCAT1='CARDIOVASCULAR CAUSE'     then AVALCA1N=1;
 95            else if AVALCAT1='NON-CARDIOVASCULAR CAUSE' then AVALCA1N=2;
 96            output;
 97         run;
 98         %end;
 99         %else %if &amp;amp;flagone.^=1 and &amp;amp;flagtwo.^=1 %then %do;
 100        data dd3_3;
 101        set dd2;
 102        
 103        if DTHFL='Y'  then do;
 104        
 105        AVALC="Unknown";
 106         aval=.;
 107           PARAMCD="PRCDTH";
 108           AVALCAT1=DDSCAT;
 109                if AVALCAT1='CARDIOVASCULAR CAUSE'     then AVALCA1N=1;
 110           else if AVALCAT1='NON-CARDIOVASCULAR CAUSE' then AVALCA1N=2;
 111        output;
 112        end;
 113        run;
 114        %end;
 115        %mend prcdth;
 116        %prcdth();
 MPRINT(PRCDTH):   data _null_;
 MPRINT(PRCDTH):   set dd2;
 MPRINT(PRCDTH):   if ddtestcd='PRCDTH' then do;
 MPRINT(PRCDTH):   call symputx('flagone',1);
 MPRINT(PRCDTH):   stop;
 MPRINT(PRCDTH):   end;
 MPRINT(PRCDTH):   run;
 
 NOTE: There were 15 observations read from the data set WORK.DD2.
 NOTE: DATA statement used (Total process time):
       real time           0.01 seconds
       cpu time            0.01 seconds
       
 
 MPRINT(PRCDTH):   data _null_;
 MPRINT(PRCDTH):   set dd2;
 MPRINT(PRCDTH):   if DDTESTCD="CANDUSO" and DDORRES="UNEQUIVOCALLY DUE TO DISEASE UNDER STUDY" then do;
 MPRINT(PRCDTH):   call symputx('flagtwo',1);
 MPRINT(PRCDTH):   stop;
 MPRINT(PRCDTH):   end;
 MPRINT(PRCDTH):   run;
 
 NOTE: There were 42 observations read from the data set WORK.DD2.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.01 seconds
       
 
 MPRINT(PRCDTH):   data dd3_1;
 MPRINT(PRCDTH):   set dd2(obs=0);
 MPRINT(PRCDTH):   run;
 
 NOTE: There were 0 observations read from the data set WORK.DD2.
 NOTE: The data set WORK.DD3_1 has 0 observations and 47 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 117        
 118        OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 131    &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;So I have added two additional derivations and &amp;amp;flagtwo macro variable.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The second derivation&lt;/STRONG&gt; (dd3_2 dataset)&amp;nbsp;I&amp;nbsp;need&amp;nbsp;to execute when the &amp;amp;flagtwo is 1 and after the &amp;amp;flagone else condition (i.e there is no&amp;nbsp;ddtestcd='PRCDTH' in dd2 dataset, but there is an observation satisfying&amp;nbsp; DDTESTCD="CANDUSO" and DDORRES="UNEQUIVOCALLY DUE TO DISEASE UNDER STUDY" condition).&lt;BR /&gt;&lt;STRONG&gt;The third derivation&lt;/STRONG&gt; (dd3_3 dataset)&amp;nbsp; I&amp;nbsp;need&amp;nbsp;to execute when the &amp;amp;flagone is ^=1 and the &amp;amp;flagtwo is ^=1, after the &amp;amp;flagtwo else condition (i.e.&amp;nbsp;there is no&amp;nbsp;ddtestcd='PRCDTH' in dd2 dataset and also there is no observation satisfying&amp;nbsp; DDTESTCD="CANDUSO" and DDORRES="UNEQUIVOCALLY DUE TO DISEASE UNDER STUDY" condition, but there is an observation satisfying&amp;nbsp;DTHFL='Y' condition).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Before %prcdth macro execution the input dataset dd2 has 1170 observations(checked manually).&lt;BR /&gt;But during the macro execution it takes only 15 and 42 observations, and dd3_2 and dd3_3 datasets are not created.&lt;/P&gt;
&lt;P&gt;Could you please take a look and give some advice on what need to be adjusted, I have attached the log as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 14:56:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-skip-data-step-processing-output-if-the-condition-met/m-p/828866#M327449</guid>
      <dc:creator>webart999ARM</dc:creator>
      <dc:date>2022-08-16T14:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip data step processing (output if the condition met)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-data-step-processing-output-if-the-condition-met/m-p/828867#M327450</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;But during the macro execution it takes only 15 and 42 observations&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The STOP command makes the DATA step stop processing observations, so the first time it stops at 15 and the next time it stops at 42. This is what I expect.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;and dd3_2 and dd3_3 datasets are not created.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's because you wrote&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%else %if &amp;amp;flagtwo.=1 %then %do;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Take the %else out of this line. And remove %else later as well.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 15:13:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-skip-data-step-processing-output-if-the-condition-met/m-p/828867#M327450</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-08-16T15:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip data step processing (output if the condition met)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-data-step-processing-output-if-the-condition-met/m-p/828882#M327453</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Take the %else out of this line. And remove %else later as well&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;All these three conditions -&amp;nbsp;%if &amp;amp;flagone.=1,&amp;nbsp;%if &amp;amp;flagtwo.=1 and&amp;nbsp;%if &amp;amp;flagone.^=1 and &amp;amp;flagtwo.^=1 are mutually exclusive but dependent from each other. If I remove the %else, then they will be executed independently from each other correct?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;second(&amp;amp;flagtwo) condition should be executed when the&amp;nbsp;&amp;amp;flagone. condition is false, and the third condition should be executed when the first two conditions are not met.&lt;/P&gt;
&lt;P&gt;So at least(and only) one of them should be executed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 16:38:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-skip-data-step-processing-output-if-the-condition-met/m-p/828882#M327453</guid>
      <dc:creator>webart999ARM</dc:creator>
      <dc:date>2022-08-16T16:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip data step processing (output if the condition met)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-data-step-processing-output-if-the-condition-met/m-p/828932#M327466</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;All these three conditions - %if &amp;amp;flagone.=1, %if &amp;amp;flagtwo.=1 and %if &amp;amp;flagone.^=1 and &amp;amp;flagtwo.^=1 are mutually exclusive but dependent from each other. If I remove the %else, then they will be executed independently from each other correct?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try it and find out for yourself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;second(&amp;amp;flagtwo) condition should be executed when the &amp;amp;flagone. condition is false, and the third condition should be executed when the first two conditions are not met. So at least(and only) one of them should be executed.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Somewhere, there is a contradiction between your explanation above, and your statement that you want data sets dd3_2 and dd3_3 output. So I don't understand what you want and cannot help until I understand. But in any case, this is a simple matter of coming up with the proper %IF %THEN %ELSE or %IF %THEN %IF %THEN (without %ELSE). Surely, since you know what the desired result is, you can state it clearly in %IF %THEN %ELSE or %IF %THEN %IF %THEN (without %ELSE) language.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 21:14:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-skip-data-step-processing-output-if-the-condition-met/m-p/828932#M327466</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-08-16T21:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip data step processing (output if the condition met)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-data-step-processing-output-if-the-condition-met/m-p/828961#M327483</link>
      <description>&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 06:40:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-skip-data-step-processing-output-if-the-condition-met/m-p/828961#M327483</guid>
      <dc:creator>webart999ARM</dc:creator>
      <dc:date>2022-08-17T06:40:29Z</dc:date>
    </item>
  </channel>
</rss>

