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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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