Recursive partitioning analysis or CART analysis with suvival data

I am trying to determine the time interval after which treatment outcomes worsen. My variable of interest is survival data (2 components, 1: time to last follow up, 2. status at last follow up (alive=censored, dead = event). My understanding is that proc HPSPLIT will not work for this type of analysis. So I am trying to write a macro as follows:

/* The original Variables: TimeToTreatment is numeric */

/*Initial Part of MACRO creates a Grouping variable depending on the value of the TimeToTreatment */

%MACRO KM_MACRO(DaysTo, WeekNo, DataTable); /*uses the grouping variable that is passed to the macro as the strata variable */

ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required.

Is there a way to fix this error, also is this the best approach for doing repeated log-rank analysis for survival data (with both survival time and status values) at different cutoff points. Can survival data be used with HPSPLIT or another function that will do recursive partitioning analysis. The ultimate goal is to look at p-values but also look at the median and mean survival times to select the best break point.