Help using Base SAS procedures

Proc Report Total Line

Reply
Super Contributor
Posts: 497

Proc Report Total Line

I am attempting to name a total line.  In a simplified example I am able to name the total line.

 

data example;
input a $ b $ mydate mmddyy8.;
datalines;
wilma stone 01122001
wilma stone 02122001
wilma stone 01012001
fred stone 03052008
fred stone 03152008
fred stone 03152009
;
run;

title 'MIN and MAX date per patient';

proc report nowd data=example;
column a b, mydate;
compute mydate;
if a='wilma' then call define(_col_, 'format','dollar10.');
endcomp;
define a / group;
define b / across;
rbreak after / summarize dol dul;
compute after;
a='total line';
endcomp;

run;

 

Is there something I am doing differently in the block below that causes the total line to not be named?

 

title 'Teaching and Research Faculty Profile (Fall)';
proc report data= myemployee out= T_R_Integer;
column tenure2 academic_period_desc , displayNum;
define displayNum / analysis '';
define academic_period_desc / across '';
define tenure2 / group '' order = internal left;
rbreak after / summarize dol dul;
compute after;
tenure2='4';
endcomp;
where employee_category = 'T & R Faculty';
run;

Super Contributor
Posts: 497

Re: Proc Report Total Line

Posted in reply to DavidPhillips2

Apparently it has something to do with that tenure2 is a number.  Is this a bug?

Super Contributor
Posts: 497

Re: Proc Report Total Line

Posted in reply to DavidPhillips2

Is there a way to make the format statement take effect to the total line text.  It seems to be capped based on the pervious format.

 

data example;
input a $ b $ mydate mmddyy8.;
datalines;
wilma stone 01122001
wilma stone 02122001
wilma stone 01012001
fred stone 03052008
fred stone 03152008
fred stone 03152009
;
run;

title 'MIN and MAX date per patient';

proc report nowd data=example;
column a b, mydate;
compute mydate;
if a='wilma' then call define(_col_, 'format','dollar10.');
endcomp;
define a / group format= $200.;
define b / across;
rbreak after / summarize dol dul;
compute after;
a='total line this is a huge amount of characters';
endcomp;

run;

Super Contributor
Posts: 497

Re: Proc Report Total Line

Posted in reply to DavidPhillips2

This worked.

 

data example;
input a $100. b $ mydate mmddyy8.;
datalines;
wilma stone 01122001
wilma stone 02122001
wilma stone 01012001
fred stone 03052008
fred stone 03152008
fred stone 03152009
;
run;

title 'MIN and MAX date per patient';

proc report nowd data=example;
column a b, mydate;
/*compute mydate;
if a='wilma' then call define(_col_, 'format','dollar10.');
endcomp;*/
define a / group format= $200.;
define b / across;
rbreak after / summarize;
compute after;
a='total line this is a huge amount of characters';
endcomp;

run;

 

Unfortunately this didn't work for my larger program.

Ask a Question
Discussion stats
  • 3 replies
  • 210 views
  • 0 likes
  • 1 in conversation