%( ars table day month generation %) %( rlm link 2 %) %let;rlm2;i2=%index;;t2=0%in; %( rlm link 3 %) %let;rlm3;%if;(browsing_with_sosa_ref)i3=%sosa_ref.index;;t3=sosa_1%end;%in; %( font family %) %let;ff;%if;(evar.ff != "")%evar.ff;%else;arial%end;%in; %( initial count %) %let;ic;%if;(evar.ic >= 0)%evar.ic;%else;400%end;%in; %( font size %) %let;fs;%if;(evar.fs >= 0)%evar.fs;%else;3%end;%in; %( width %) %let;width;%if;(evar.width >= 0)%evar.width;%else;2048%end;%in; %( height %) %let;height;%if;(evar.height >= 0)%evar.height;%else;1536%end;%in; %( left x %) %let;lx;%expr(width / 35)%in; %( top x %) %let;tx;%expr(height / 13)%in; %( red %) %let;red;%if;(evar.red >= 0)%evar.red;%else;10%end;%in; %( green %) %let;green;%if;(evar.green >= 0)%evar.green;%else;10%end;%in; %( blue %) %let;blue;%if;(evar.blue >= 0)%evar.blue;%else;10%end;%in; %(male birth text %) %let;mbt;%if;(evar.mbt != "")%evar.mbt;%else;%end;%in; %(male death text %) %let;mdt;%if;(evar.mdt != "")%evar.mdt;%else;%end;%in; %(female birth text %) %let;fbt;%if;(evar.fbt != "")%evar.fbt;%else;%end;%in; %(female death text %) %let;fdt;%if;(evar.fdt != "")%evar.fdt;%else;%end;%in; %(male birth field%) %let;mbf;%if;(evar.mbf != "")%evar.mbf;%else;first_name%end;%in; %(male death field%) %let;mdf;%if;(evar.mdf != "")%evar.mdf;%else;occupation%end;%in; %(female birth field%) %let;fbf;%if;(evar.fbf != "")%evar.fbf;%else;surname%end;%in; %(female death field%) %let;fdf;%if;(evar.fdf != "")%evar.fdf;%else;dates%end;%in; %define;tf1_ars(xx) %end; %define;anc_ars(m_bt,m_bf,m_dt,m_df,f_bt,f_bf,f_dt,f_df) %reset_count; %empty_sorted_list; %foreach;ancestor_level(l_v) %if;(level > 1 and (evar.only != "on" or level = l_v)) %let;lev;%expr(l_v - level + 1)%in; %foreach;ancestor; %if;(ancestor.same = "") %incr_count; %let;aad; %if;(ancestor.death_date.year > ancestor.birth_date.year) %expr((ancestor.death_date.year - ancestor.birth_date.year)*2) %else;0%nn; %end; %in; %if;(ancestor.sex = 0) %apply;add_in_sorted_list( level,ancestor.index,ancestor.sex, ancestor.birth_date.day,ancestor.birth_date.month, ancestor.death_date.day,ancestor.death_date.month, "m_bt",m_bf,"m_dt",m_df,aad,lev) %else; %apply;add_in_sorted_list( level,ancestor.index,ancestor.sex, ancestor.birth_date.day,ancestor.birth_date.month, ancestor.death_date.day,ancestor.death_date.month, "f_bt",f_bf,"f_dt",f_df,aad,lev) %end; %end; %end; %end; %end; %end; %define;des_ars(curlev,maxlev,m_bt,m_bf,m_dt,m_df,f_bt,f_bf,f_dt,f_df) %incr_count; %let;lev;%expr(l_v - curlev + 1)%in; %let;aad; %if;(death_date.year > birth_date.year) %expr((death_date.year - birth_date.year)*2) %else;0%nn; %end; %in; %if;(sex = 0) %apply;add_in_sorted_list( lev,index,sex, birth_date.day,birth_date.month, death_date.day,death_date.month, "m_bt",m_bf,"m_dt",m_df,aad,curlev) %else; %apply;add_in_sorted_list( lev,index,sex, birth_date.day,birth_date.month, death_date.day,death_date.month, "f_bt",f_bf,"f_dt",f_df,aad,curlev) %end; %foreach;family; %if;(curlev < maxlev and family.desc_level = curlev and has_children) %family.set_infinite_desc_level; %foreach;child; %apply;des_ars(curlev+1,maxlev,"m_bt","m_bf","m_dt","m_df","f_bt","f_bf","f_dt","f_df") %end; %end; %end; %end; %define;ars()