MACRO TWO BOBO: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
K |
K |
||
Zeile 19: | Zeile 19: | ||
== Source == | == Source == | ||
− | + | === Start Definition with Parameters and Defaults === | |
%MACRO TWO_BOBO(dsn=,use=,use2=,row=,row2=,col=,indent=0,indinc=2,num=,total=T,stat=Y,weight=Y,rev=N,space=2,condense=,struct=,struct2=,head=Y,head2=N) / store des="Create hierarchy from two boolean vars"; | %MACRO TWO_BOBO(dsn=,use=,use2=,row=,row2=,col=,indent=0,indinc=2,num=,total=T,stat=Y,weight=Y,rev=N,space=2,condense=,struct=,struct2=,head=Y,head2=N) / store des="Create hierarchy from two boolean vars"; | ||
− | + | === Declares and Upper Level Processing === | |
%LOCAL n_lst v_lst row_n use_n n_grp v_grp n i name; | %LOCAL n_lst v_lst row_n use_n n_grp v_grp n i name; | ||
Zeile 35: | Zeile 35: | ||
%IF &STRUCT2 eq %THEN %LET struct2=top_filt; | %IF &STRUCT2 eq %THEN %LET struct2=top_filt; | ||
− | + | === Loop for Lower Level Processing === | |
%DO n=1 %TO &N_LST; | %DO n=1 %TO &N_LST; | ||
Zeile 50: | Zeile 50: | ||
%END; | %END; | ||
− | + | === Care for Naming and Send Completion Mail === | |
%IF &TAB_NAME ne %THEN %DO; | %IF &TAB_NAME ne %THEN %DO; | ||
Zeile 69: | Zeile 69: | ||
%GEN_MAIL(name=&NAME); | %GEN_MAIL(name=&NAME); | ||
− | + | === Close Definition === | |
%MEND TWO_BOBO; | %MEND TWO_BOBO; |
Version vom 28. Oktober 2014, 15:35 Uhr
Workflow Graph | Module Type |
---|---|
User module from Phase-III Macro System based on Fractal System Architecture. Build super row (=block) from boolean selections nested in boolean selection. |
Inhaltsverzeichnis
Source
Start Definition with Parameters and Defaults
%MACRO TWO_BOBO(dsn=,use=,use2=,row=,row2=,col=,indent=0,indinc=2,num=,total=T,stat=Y,weight=Y,rev=N,space=2,condense=,struct=,struct2=,head=Y,head2=N) / store des="Create hierarchy from two boolean vars";
Declares and Upper Level Processing
%LOCAL n_lst v_lst row_n use_n n_grp v_grp n i name; %LET name=TWO_BOBO; %IF &STRUCT eq %THEN %LET struct =&DSN; %CHK_LIST(list=&ROW2); %GRP_DESC(dsn=&DSN,grp=&ROW,miss=n); %TOP_FILT(dsn=&DSN,grp=&ROW,grp2=,by=&COL,grplvl=&NUM,var=,condense=&CONDENSE); %TOP_FREQ(dsn=top_filt,struct=&STRUCT,grp=&ROW,by=&COL); %TOP_OUTC(dsn=top_freq,head=&HEAD,total=&TOTAL,stat=&STAT,indent=&INDENT,grp=&ROW,rev=&REV,use=&USE,by=&COL); %IF &STRUCT2 eq %THEN %LET struct2=top_filt;
Loop for Lower Level Processing
%DO n=1 %TO &N_LST; %LET row_n = %SCAN(%SCAN(&V_LST,&N,|),1,#); %LET use_n = %SCAN(%SCAN(&V_LST,&N,|),2,#); %DO i=1 %TO &N_GRP; %IF %SCAN(&V_GRP,&I,|) eq &USE2 %THEN %DO; %ROW_FILT(dsn=&DSN,context=&ROW,subgrp=&I,grp=&ROW_N,by=&COL,var=,miss=n); %ROW_FREQ(dsn=row_filt,sum=top_freq,struct=&STRUCT2,context=&ROW,grp=&ROW_N,by=&COL,weight=&WEIGHT); %LET cursub=&N; %ROW_OUTC(dsn=row_freq,sum=,head=&HEAD2,stat=&STAT,indent=%EVAL(&INDENT+&INDINC),context=&ROW,grp=&ROW_N,use=&USE_N,by=&COL); %END; %END; %END;
Care for Naming and Send Completion Mail
%IF &TAB_NAME ne %THEN %DO; data %SUBSTR(&TAB_NAME,1,3)&NUM%SUBSTR(&TAB_NAME,5,4); set row&NUM._0(where=(class not contains "Missing")) %IF &SPACE eq 1 %THEN dummy; %DO n=1 %TO &N_LST; %IF &SPACE eq 2 %THEN dummy; row&NUM._&N %END; %IF &SPACE eq 2 %THEN dummy; row&NUM._0(where=(class contains "Missing")) %IF &SPACE eq 3 %THEN dummy; ; run; %END; %GEN_MAIL(name=&NAME);
Close Definition
%MEND TWO_BOBO;
Parameters
Name | Values | Description |
---|