You could try alternative approaches to the analysis such as a nonmodeling approach with PROC FREQ, a conditional logistic model using the STRATA statement in PROC LOGISTIC, or a Generalized Estimating Equations (GEE) model in PROC GENMOD using the REPEATED statement. As Rick suggests, the problem here is likely that the presence of the interaction makes the data too sparse causing a condition in which some model parameters are infinite and nonexistence of the maximum likelihood solution. PROC LOGISTIC refers to this as "separation" which is described more in this note. The PROC FREQ approach might be particularly attractive for this since you essentially have a stratified 2x2 table with each visit being a stratum. So, as in the note:
proc freq;
table visitn*treatarm*mainvariable / cmh noprint;
run;
... View more