The following might not keep your data points ordered within each group, but will give you row numbers by group. This works in 9.4, don't know about earlier.
PROC SQL;
CREATE TABLE foo AS
SELECT data, group, (MONOTONIC() - MIN(MONOTONIC()) + 1) AS row_n