The SAS Output Delivery System and reporting techniques

How to reset the results attribute name

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 15
Accepted Solution

How to reset the results attribute name

Hi:

    I want to use "ods select LIFETEST" to select the Survival figure and output it to the rtf file. The code as follow. When I submit it the first time. It can work. But when I submit it again. It can't work. I check it in the Results Window. Click the Survival Properties. I found that the first time submit name is LIFETEST. The second is LIFETES1. When I submit the code more times. It will named:LIFETES2,LIFETES3,LIFETES4...and so on. So my question is: Do SAS has a method to make the results attribute name same no matter how many times I submit the code. My English is not good. Thanks!

   

DATA SA; INPUT T@@;
IF T<0 THEN CENSOR=1;
ELSE CENSOR=0;
IF _N_>16 THEN GROUP=2;
ELSE GROUP=1; T=ABS(T);
CARDS;
-2 4 -6 -6 -7.5 8.5 -9 10 -12 13 18 -19 24 26 31
-43 1.5 -2 3.5 6 6.5 -6.5 11 -11 13 17
;
run;

ods rtf file='D:/temp.rtf' bodytitle;

PROC LIFETEST METHOD=PL PLOT=(S);
TIME T*CENSOR(1);
STRATA GROUP;
RUN;

ods rtf close;


Accepted Solutions
Solution
‎08-10-2011 03:55 AM
Occasional Contributor
Posts: 15

How to reset the results attribute name

Hi:

    I solved it myselft! Thank you all the same. The command "noprint" is OK and do not use ods select. Actually I still think out another method. Using: ods exclude. But this method seems more trouble.

DATA SA;

INPUT T@@;
IF T<0 THEN CENSOR=1;
ELSE CENSOR=0;
IF _N_>16 THEN GROUP=2;
ELSE GROUP=1; T=ABS(T);
CARDS;
-2 4 -6 -6 -7.5 8.5 -9 10 -12 13 18 -19 24 26 31
-43 1.5 -2 3.5 6 6.5 -6.5 11 -11 13 17
;
run;

title;
options nodate nonumber;
ods rtf file='D:/temp.rtf' bodytitle;

PROC LIFETEST METHOD=PL PLOT=(S) noprint;
TIME T*CENSOR(1);
STRATA GROUP;
RUN;

ods rtf close;

View solution in original post


All Replies
Occasional Contributor
Posts: 15

How to reset the results attribute name

Hi:

   I'm sorry I forget some code.

DATA SA;

INPUT T@@;
IF T<0 THEN CENSOR=1;
ELSE CENSOR=0;
IF _N_>16 THEN GROUP=2;
ELSE GROUP=1; T=ABS(T);
CARDS;
-2 4 -6 -6 -7.5 8.5 -9 10 -12 13 18 -19 24 26 31
-43 1.5 -2 3.5 6 6.5 -6.5 11 -11 13 17
;
run;

ods select LIFETEST;

ods rtf file='D:/temp.rtf' bodytitle;

PROC LIFETEST METHOD=PL PLOT=(S);
TIME T*CENSOR(1);
STRATA GROUP;
RUN;

ods rtf close;

Solution
‎08-10-2011 03:55 AM
Occasional Contributor
Posts: 15

How to reset the results attribute name

Hi:

    I solved it myselft! Thank you all the same. The command "noprint" is OK and do not use ods select. Actually I still think out another method. Using: ods exclude. But this method seems more trouble.

DATA SA;

INPUT T@@;
IF T<0 THEN CENSOR=1;
ELSE CENSOR=0;
IF _N_>16 THEN GROUP=2;
ELSE GROUP=1; T=ABS(T);
CARDS;
-2 4 -6 -6 -7.5 8.5 -9 10 -12 13 18 -19 24 26 31
-43 1.5 -2 3.5 6 6.5 -6.5 11 -11 13 17
;
run;

title;
options nodate nonumber;
ods rtf file='D:/temp.rtf' bodytitle;

PROC LIFETEST METHOD=PL PLOT=(S) noprint;
TIME T*CENSOR(1);
STRATA GROUP;
RUN;

ods rtf close;

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 172 views
  • 0 likes
  • 1 in conversation