I created a data with 100,000 obs with uniform distribution and also created information for education and wage, but now, from this data I have to create 500 samples random (each one has to be different) but I tried with bsample and it didn't work, so I read about forvalue and foreach (to apply a loop), but I'm not sure how use it, I was trying but I really need help. This is how I created the data:

set obs 100000
set seed 20
gen x=_n
gen educ= 1 + (4-1)*uniform()
sum educ
gen error= 0.5+1*invnorm(uniform())
gen leduc=log(educ)
gen lwage=0.35*leduc+error
gen wage=(educ^0.35)*exp(error)