MACRO TAB CATV
Version vom 6. März 2014, 12:38 Uhr von Wolf-Dieter Batz (Diskussion | Beiträge)
Type
User module from Phase-III Macro System based on Fractal System Architecture.
Workflow / Source
%MACRO TAB_CATV(dsn=,row=,col=,total=T,head=Y,indent=0,num=,stat=Y,space=2,rev=N,condense=,missline=) / store; %LOCAL n_lst v_lst n row_n name; %LET name=TAB_CATV; proc datasets nolist lib=work; delete %SUBSTR(&TAB_NAME,1,3)&NUM%SUBSTR(&TAB_NAME,5,4); run; quit; %CHK_LIST(list=&ROW); %DO n=1 %TO &N_LST; %LET row_n=%SCAN(&ROW,&N); %IF &TAB_NAME eq %THEN %DO; %BLK_CATV(dsn=&DSN,row=&ROW_N,rev=&REV,col=&COL,total=&TOTAL,head=&HEAD,indent=&INDENT,num=%EVAL(&NUM+&N-1),stat=&STAT,space=&SPACE,condense=&CONDENSE,missline=&MISSLINE); %END; %IF &TAB_NAME ne %THEN %DO; %IF &N gt 1 and %UPCASE(&TOTAL) eq T %THEN %LET total=n; %BLK_CATV(dsn=&DSN,row=&ROW_N,rev=&REV,col=&COL,total=&TOTAL,head=&HEAD,indent=&INDENT,num=0,stat=&STAT,space=&SPACE,condense=&CONDENSE,missline=&MISSLINE); proc append base=%SUBSTR(&TAB_NAME,1,3)&NUM%SUBSTR(&TAB_NAME,5,4) data=%SUBSTR(&TAB_NAME,1,3)0%SUBSTR(&TAB_NAME,5,4); run; proc datasets nolist lib=work; delete %SUBSTR(&TAB_NAME,1,3)0%SUBSTR(&TAB_NAME,5,4); run; quit; %END; %END; %GEN_MAIL(name=&NAME); %MEND TAB_CATV; |