proc report a Recollections: cycle of the output, the output points, plus a horizontal line, plus text information, and add a blank line width setting

When the output of the output, for some reason, for example, some cases of different groups are not the same, then the output need to be separated, can regularly% do loop, not the law can be used% if the output points:

For the packet according to the table proc report, each group having N different, each group should Report cycle, the position in the header of each different set of N different values. Using a circulating manner ---> do loops used in a macro, macro variables i referenced manufacture.
Macro Report%;
Options PaperSize = Letter Orientation = Landscape nodate nonumber Center Missing = "" nobyline;
ODS EscapeChar = "@";
ODS use Close Listing;

% do I =. 1% to. 4 ;
proc Report Data = Final (. WHERE = (agegr2n = & I)) Missing NOWD headline headskip nocenter spacing = 2 Split = "~";
 column ...... ( "Completion / Discontinuation @ R & lt / the RTF '\ fs0 \ brdrb \ brdrs \ brdrw10 \ qc "col4 col5);
 note: brdrw10 is the width of the header of that column dividing line, qc is centered display, ql represents the left display; col4 and col5 co-owner header" Completion / Discontinuation "

                    
 define……;
 define col2/display "Placebo ->~SD-101-6.0~(N=&&x&i)~n (%)"       &line. style(column)=[cellwidth=21.5% just=c asis=on]   style(header)=[just=c] ;
 define col3/display "SD-101-6.0 ->~SD-101-6.0~(N=&&y&i)~n (%)"  &line. style(column)=[cellwidth=21.5% just=c asis=on]   style(header)=[just=c] ;
 define col4/display "Total~(N=&&z&i)~n (%)"                                     &line. style(column)=[cellwidth=21.5% just=c asis=on]   style(header)=[just=c] ;
 break after page/page ;                   
 compute after seq;
  line '@\fs6';                endcomp;                                     note: between each group plus the number of blank lines, comprising a blank line width

 the After _page_ Compute;
  Line & Line;                  note: page after adding horizontal line
 endcomp;              

before _page_ Compute / left;
  text = "Age Group:" || Strip (COL0);       
  Line text. 1 @ $ 100 .;     Note: front page plus the horizontal line, before adding packet information text pages  
  Line Line .; & 
endcomp;                                     
% End;
RUN;


ods rtf close;
ods listing;
%mend report;                       

Guess you like

Origin www.cnblogs.com/jwcutey/p/12142998.html