<?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: Determine flow references in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Determine-flow-references/m-p/199172#M49768</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes I know it is difficult to explain &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.sas.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But your code works almost perfectly.&lt;/P&gt;&lt;P&gt;The only problem is with 10-1, 11-1, 13-1 from the final output.&lt;/P&gt;&lt;P&gt;This connection should not exist since 1 has been closed in the month (datas - datas_ini in JANUARY).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10x&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Mar 2015 16:55:20 GMT</pubDate>
    <dc:creator>Loko</dc:creator>
    <dc:date>2015-03-12T16:55:20Z</dc:date>
    <item>
      <title>Determine flow references</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Determine-flow-references/m-p/199170#M49766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the attached tab-delimited file I need to determine the process flow of the active processes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To identify the active process the condition is missing(datef)=1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example Process 682 is active and it comes from 634. BUT 632 is opened and closed in the current month &lt;BR /&gt;(datas_ini = 2JAN2015 and datef_ini=5JAN2015). Therefore we have to look back at 632 and determine where it comes from.&lt;BR /&gt;632 comes from 447, 510, 559. BUT since 510 is opened and closed in the current month it is ignored.&lt;BR /&gt;Eventually the correct result is 682-447 and 682-559.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code I have build does not work for all the cases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's take process no 9. 9 comes from 7.&lt;BR /&gt;BUT 7 is opened and closed in the current month.&lt;BR /&gt;Looking back at 7 we see that 7 comes from 3, 5, 6.&lt;BR /&gt;Since 3 is closed we look back at it and notice that 3 comes from 4.&lt;BR /&gt;4 is closed - we look back at it and we notice that 4 comes from 44.&lt;BR /&gt;Therefore 7 comes from 44.&lt;BR /&gt;BUT 7 also comes from 5 and 6 since those processes are active.&lt;BR /&gt;Unfortunately the codes does not write to output - 7-44, 7-5 and 7-6. It only writes 7-44.&lt;/P&gt;&lt;P&gt;The correspondence of the variables is ky-process-datef-datas and ky_ini_ini-process_ini-datef_ini-datas_ini.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let &amp;amp;data_lun_ant="31DEC2015"d;&lt;/P&gt;&lt;P&gt;data want ;&lt;/P&gt;&lt;P&gt;length ky_ini_hsh $ 30;&lt;BR /&gt;if 0 then set have;&lt;/P&gt;&lt;P&gt;if _n_ eq 1 then do;&lt;BR /&gt; CALL MISSING(process_ini_hsh,datas_ini_hsh,datef_ini_hsh);&lt;BR /&gt; call missing(ky_ini_hsh);&lt;BR /&gt; declare hash ir(dataset:"have(rename=(process_ini=process_ini_hsh&lt;BR /&gt; datas_ini=datas_ini_hsh datef_ini=datef_ini_hsh ky_ini=ky_ini_hsh&lt;BR /&gt; ) where=(datas gt &amp;amp;data_lun_ant and datef gt &amp;amp;data_lun_ant))", multidata:'Y');&lt;BR /&gt; ir.definekey('ky');&lt;BR /&gt; ir.definedata('process_ini_hsh','datas_ini_hsh', 'datef_ini_hsh', 'ky_ini_hsh');&lt;BR /&gt; ir.definedone();&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;set have(where=(missing(datef)=1));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if datas_ini gt &amp;amp;data_lun_ant and datef_ini gt &amp;amp;data_lun_ant then&lt;BR /&gt;do;&lt;/P&gt;&lt;P&gt; rc=ir.find(key:ky_ini);&lt;BR /&gt; do while (rc=0);&lt;BR /&gt;&amp;nbsp; if datas_ini_hsh gt &amp;amp;data_lun_ant and datef_ini_hsh gt &amp;amp;data_lun_ant then&lt;BR /&gt;do;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;_ky_ini_hsh=ky_ini_hsh;&lt;BR /&gt;_ky_ini=ky_ini;&lt;BR /&gt;rc1=ir.find_next(key:_ky_ini);&lt;BR /&gt;rc=ir.find(key:_ky_ini_hsh);&lt;BR /&gt;if rc1=0 then rc=0;&lt;BR /&gt;end;&lt;BR /&gt;&amp;nbsp; else do;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; conne=catx('-',process,process_ini_hsh);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; rc=ir.find_next(key:ky_ini);&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt; end;&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;else do;conne=catx('-',process,process_ini);output;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2015 15:17:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Determine-flow-references/m-p/199170#M49766</guid>
      <dc:creator>Loko</dc:creator>
      <dc:date>2015-03-11T15:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: Determine flow references</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Determine-flow-references/m-p/199171#M49767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hard to catch on you . Too many uncertain things.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;


data x;
input ky $ ky_ini $ process $ process_ini $ (datef&amp;nbsp;&amp;nbsp; datas&amp;nbsp;&amp;nbsp; datas_ini&amp;nbsp;&amp;nbsp; datef_ini ) (: ddmmyy10.);
format datef&amp;nbsp;&amp;nbsp; datas&amp;nbsp;&amp;nbsp; datas_ini&amp;nbsp;&amp;nbsp; datef_ini&amp;nbsp; ddmmyy10.;
cards;
CL632&amp;nbsp;&amp;nbsp; CL447&amp;nbsp;&amp;nbsp; 632 447 02/01/2015&amp;nbsp; 02/01/2015&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . .
CL632&amp;nbsp;&amp;nbsp; CL510&amp;nbsp;&amp;nbsp; 632 510 02/01/2015&amp;nbsp; 02/01/2015&amp;nbsp; 02/01/2015&amp;nbsp; 05/01/2015
CL632&amp;nbsp;&amp;nbsp; CL559&amp;nbsp;&amp;nbsp; 632 559 02/01/2015&amp;nbsp; 02/01/2015&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp; .
CL682&amp;nbsp;&amp;nbsp; CL632&amp;nbsp;&amp;nbsp; 682 632&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp; 02/01/2015&amp;nbsp; 02/01/2015 .
CL684&amp;nbsp;&amp;nbsp; CL632&amp;nbsp;&amp;nbsp; 684 632&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp; 02/01/2015&amp;nbsp; 02/01/2015 .
LC1563&amp;nbsp; SV560&amp;nbsp;&amp;nbsp; 1563&amp;nbsp;&amp;nbsp;&amp;nbsp; 560 02/01/2015&amp;nbsp; 02/01/2015&amp;nbsp; . . 
LC537&amp;nbsp;&amp;nbsp; LC1563&amp;nbsp; 537 1563&amp;nbsp;&amp;nbsp;&amp;nbsp; 02/01/2015&amp;nbsp; 02/01/2015&amp;nbsp; 02/01/2015&amp;nbsp; 02/01/2015
LC2537&amp;nbsp; LC537&amp;nbsp;&amp;nbsp; 2537&amp;nbsp;&amp;nbsp;&amp;nbsp; 537 02/01/2015&amp;nbsp; 02/01/2015&amp;nbsp; 02/01/2015&amp;nbsp; 02/01/2015
SV20000 LC2537&amp;nbsp; 20000&amp;nbsp;&amp;nbsp; 2537&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp; 02/01/2015&amp;nbsp; 02/01/2015 .
SV20000 LC2537&amp;nbsp; 20000&amp;nbsp;&amp;nbsp; 2537&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp; 02/01/2015&amp;nbsp; 02/01/2015 .
SV20000 LC2537&amp;nbsp; 20000&amp;nbsp;&amp;nbsp; 2537&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp; 02/01/2015&amp;nbsp; 02/01/2015 .
LC1 LC1112&amp;nbsp; 1&amp;nbsp;&amp;nbsp; 1112&amp;nbsp;&amp;nbsp;&amp;nbsp; 02/01/2015&amp;nbsp; 02/01/2015&amp;nbsp; . . 
LC2 LC1112&amp;nbsp; 2&amp;nbsp;&amp;nbsp; 1112&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp; .&amp;nbsp; .
LC10&amp;nbsp;&amp;nbsp;&amp;nbsp; LC1 10&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp; 02/01/2015&amp;nbsp; 02/01/2015 .
LC11&amp;nbsp;&amp;nbsp;&amp;nbsp; LC1 11&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp; 02/01/2015&amp;nbsp; 02/01/2015 .
LC13&amp;nbsp;&amp;nbsp;&amp;nbsp; LC1 13&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp; 02/01/2015&amp;nbsp; 02/01/2015 .
LC4 LC44&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp; 44&amp;nbsp; 02/01/2015&amp;nbsp; 02/01/2015&amp;nbsp; . . 
LC3 LC4 3&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp; 02/01/2015&amp;nbsp; 02/01/2015&amp;nbsp; 01/02/2015&amp;nbsp; 02/01/2015
LC7 LC3 7&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp; 02/01/2015&amp;nbsp; 02/01/2015&amp;nbsp; 01/02/2015&amp;nbsp; 02/01/2015
LC7 LC5 7&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp; 02/01/2015&amp;nbsp; 02/01/2015&amp;nbsp; . . 
LC7 LC6 7&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp; 02/01/2015&amp;nbsp; 02/01/2015&amp;nbsp; . . 
LC9 LC7 9&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp; 02/01/2015&amp;nbsp; 02/01/2015 .
LC9 LC8 9&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp; . .&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
;
run;
data have;
 set x(rename=(process=from process_ini=to) );
 length flag $ 1;
 if&amp;nbsp; not missing(datas_ini) and not missing(datef_ini) then flag='*';
 keep from to flag;
run;
data ancestor;
if _n_ eq 1 then do;
 if 0 then set have;
 declare hash h(dataset:'have',hashexp:20);
 h.definekey('to');
 h.definedone();
end;
 set have;
 if h.check(key:from) ne 0;
run;


data want (keep =&amp;nbsp; path);
if _n_ eq 1 then do;
length path _path&amp;nbsp; $ 2000 ;
if 0 then set have;
declare hash ha(hashexp:20,dataset:'have(where=(From is not missing and To is not missing))',multidata:'Y');
ha.definekey('From');
ha.definedata('To');
ha.definedone();
declare hash pa(ordered:'Y');
declare hiter hi_path('pa');
pa.definekey('count');
pa.definedata('path');
pa.definedone();
end;
set ancestor;
count=1;
path=catx(' ',From,To);
pa.add();
do while(hi_path.next()=0);
_path=path;&amp;nbsp;&amp;nbsp; 
From=scan(path,-1,' '); 
rc=ha.find();
if rc ne 0 then output;
do while(rc=0);
&amp;nbsp; if not find(path,strip(To)) then do;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count+1;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path=catx(' ',path,To);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pa.add();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path=_path;
&amp;nbsp; end;
&amp;nbsp; rc=ha.find_next();
end;
end;
pa.clear();
run;


data key;
 set have(where=(flag='*'));
 key=from;output;
 key=to;output;
 keep key;
run;
data final_want;
if _n_ eq 1 then do;
 if 0 then set key;
 declare hash h(dataset:"key");
 h.definekey('key');
 h.definedone();
end;
set want;
length want start $ 20;
start=scan(path,1);
do i=2 to countw(path);
&amp;nbsp; key=scan(path,i);
&amp;nbsp; if h.check() ne 0 then do;want=catx('-',start,key);output;end;
end;
keep start want ;
run;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2015 11:41:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Determine-flow-references/m-p/199171#M49767</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-03-12T11:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: Determine flow references</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Determine-flow-references/m-p/199172#M49768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes I know it is difficult to explain &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.sas.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But your code works almost perfectly.&lt;/P&gt;&lt;P&gt;The only problem is with 10-1, 11-1, 13-1 from the final output.&lt;/P&gt;&lt;P&gt;This connection should not exist since 1 has been closed in the month (datas - datas_ini in JANUARY).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10x&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2015 16:55:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Determine-flow-references/m-p/199172#M49768</guid>
      <dc:creator>Loko</dc:creator>
      <dc:date>2015-03-12T16:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Determine flow references</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Determine-flow-references/m-p/199173#M49769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is what I am confused with .&lt;/P&gt;&lt;P&gt;You said "&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em; background-color: #ffffff;"&gt; is opened and closed in the current month &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em; background-color: #ffffff;"&gt;(datas_ini = 2JAN2015 and datef_ini=5JAN2015)"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em; background-color: #ffffff;"&gt;But&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;LC3 LC4 3&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp; 02/01/2015&amp;nbsp; 02/01/2015&lt;STRONG&gt;&amp;nbsp; 01/02/2015&amp;nbsp; 02/01/2015&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;LC7 LC3 7&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp; 02/01/2015&amp;nbsp; 02/01/2015&amp;nbsp; &lt;STRONG&gt;01/02/2015&amp;nbsp; 02/01/2015&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Their month are not the same, while you still get rid of them , that is right ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;This connection should not exist since 1 has been closed in the month (datas - datas_ini in JANUARY)."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;That is not ture. Base on your data , &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;datef_ini is missing value .&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LC1 LC1112&amp;nbsp; 1&amp;nbsp;&amp;nbsp; 1112&amp;nbsp;&amp;nbsp;&amp;nbsp; 02/01/2015&amp;nbsp; 02/01/2015 &lt;STRONG&gt; . . &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;LC2 LC1112&amp;nbsp; 2&amp;nbsp;&amp;nbsp; 1112&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp; .&amp;nbsp; .&lt;/P&gt;&lt;P&gt;LC10&amp;nbsp;&amp;nbsp;&amp;nbsp; LC1 10&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp; 02/01/2015 &lt;STRONG&gt; 02/01/2015 .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;LC11&amp;nbsp;&amp;nbsp;&amp;nbsp; LC1 11&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp; 02/01/2015&amp;nbsp; &lt;STRONG&gt;02/01/2015 .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;LC13&amp;nbsp;&amp;nbsp;&amp;nbsp; LC1 13&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp; 02/01/2015&amp;nbsp; &lt;STRONG&gt;02/01/2015 .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2015 08:36:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Determine-flow-references/m-p/199173#M49769</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-03-13T08:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: Determine flow references</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Determine-flow-references/m-p/199174#M49770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are right. When I have built the dataset example I have mistyped date values for that sequence.&lt;/P&gt;&lt;P&gt;datas_ini and datef_ini should have been in the same month for process 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have changed the values in the example, and the code gives the expected results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10x&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2015 09:15:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Determine-flow-references/m-p/199174#M49770</guid>
      <dc:creator>Loko</dc:creator>
      <dc:date>2015-03-13T09:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: Determine flow references</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Determine-flow-references/m-p/199175#M49771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh. If their month should be the same. You also need to change my code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if&amp;nbsp; not missing(datas_ini) and not missing(datef_ini) then flag='*';&lt;/P&gt;&lt;P&gt;--&amp;gt;&lt;/P&gt;&lt;P&gt;if&amp;nbsp; month(datas_ini) = month(datef_ini) then flag='*';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: xia keshan Sorry. A problem found.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2015 09:39:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Determine-flow-references/m-p/199175#M49771</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-03-13T09:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Determine flow references</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Determine-flow-references/m-p/199176#M49772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok, 10x&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2015 13:48:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Determine-flow-references/m-p/199176#M49772</guid>
      <dc:creator>Loko</dc:creator>
      <dc:date>2015-03-13T13:48:52Z</dc:date>
    </item>
  </channel>
</rss>

