BookmarkSubscribeRSS Feed
psusudzi92
Calcite | Level 5
Hi all,

I put together a program to display Progression Free Survival (PFS) and Overall Survival (OS) for a listing, i.e. it displays these results as a number of days, 25, 110, etc. One of the requests from a reviewer (and common in these types of listings) is to display a + before the results if the subject is still alive, e.g. Subj 001 PFS = +99 (still alive) vs. Subj 002 PFS = 99 (died). I'm at a loss as to how to do this other than I know I'll have to check whether my Date of Death is either null or present. Any ideas?

Thanks!

John
2 REPLIES 2
Doc_Duke
Rhodochrosite | Level 12
You could create a format for your death indicator that assigns a value of + for alive and blank otherwise and then just print the two columns side-by-side.

If the people receiving the listing are picky and insist on numbers like you displayed, you could create a display field that is text and a combination of the indicator and the number, something like
length OSdisp $ 5;
FORMAT osdisp $char5.;
OSdisp=RIGHT(AliveAsPlus||LEFT(PUT(os,3.)));
psusudzi92
Calcite | Level 5
Thanks Doc!

I'll give it a shot.

John

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 2 replies
  • 1454 views
  • 0 likes
  • 2 in conversation