You could initialize an array with the name of the variables that you want.
For example, you could have said array y_(5); Then you reference the array like so in the data step: y_(i) = value;. When the array is stored in the dataset, it will actually be stored as y_1, y_2, etc.
Note; In the array statement, the number in parentheses tells sas how many elements you need in your array; for you example, it should match the number of iterations in the do loop.