Hi.
what does the " =: " mean?
Thank you.
Anca.
Hi Antea,
Following is my data.
Data sample:
Set sample;
Amd1_9-;
AMD1_10-;
Run;
AMD1_9-History of another malignancy within the previous 5 years other than curatively treated non-
melanomatous skin cancer
AMD1_10-Current or prior treatment with estrogens and/or drugs with anti-androgenic properties such
as spironolactone > 50mg/kg, or progestational agents for the treatment of prostate cancer less than 6
months prior to randomization .
I need my new variable sample:
"History of another malignancy within the previous 5 years other than curatively treated non-
melanomatous skin cancer"
hmmm, something like this:
Data sample;
input sample $50.;
cards;
AMD1_9-History of another malignancy within
AMD1_10-Current or prior treatment with estrogens
;
Run;
proc print;run;
data want;
set sample;
new_sample = prxchange("s/.*[-]//i",1,(sample));
run;
proc print;run;
new_sample = prxchange("s/.*[-]//i",1,(sample));
could u please tell me what i have to place in s and i
You don't need to change either of those s, or i (those are keywords for s = string, and i = case insensitive)
the variable name is sample, right?
The "=:' sets the length of the right side argument to the length of the left side argument.
So - if the left argument is 1 character, the "=:' will only look at the first character of the right side argument.
Very handy.
Thanks!
Thank you very much Tilea. Your suggestions were of great help.
regards,
Murali.
its working but my last char in word is truncating
ex :fever
as feve .
could u tell me any other way
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.