_TEMPORARY_ arrays in PROC PHREG are not initialized correctly


There is a problem with using _TEMPORARY_ arrays in programming statements inside the PROC PHREG step. In a DATA step, the elements of a _TEMPORARY_ array retain their values between observations. In PROC PHREG, elements of a _TEMPORARY_ array are zero for all observations, regardless of their initial values.

To circumvent the problem, explicitly define the array elements as covariates as in the PHREG documentation example "Time-Dependent Repeated Measurements of a Covariate."