BookmarkSubscribeRSS Feed
DavidPhillips2
Rhodochrosite | Level 12

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;

3 REPLIES 3
DavidPhillips2
Rhodochrosite | Level 12

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

DavidPhillips2
Rhodochrosite | Level 12

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;

DavidPhillips2
Rhodochrosite | Level 12

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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1511 views
  • 0 likes
  • 1 in conversation