I created a SAS Macro that divides a dataset into 'n' equal parts for bootstrap validation, using the Firstobs and obs data set options. I haven't tested the program written in the SAS Blog, but after reading it, I believe you used more steps than necessary to achieve the same result as mine. You can find my SAS macro code on my blog, where I have used it successfully on many datasets. it took me 2 hrs to sucessfully get the logic behind the relationship between obs, firstobs and total number of observations in the dataset. If you have some time then Review SAS macro in my blog as well: https://srinisasmacro.blogspot.com/