Note that your original objective function had x[3]**2 in the denominator. With your latest change, it is now just x[3]. If that is what you want, here's a way to make the code more data-driven (without hard-coding 1..3):
proc optmodel;
set OBS;
var x {OBS};
num a {OBS};
num b {OBS};
max z1 = (sum {j in OBS} a[j]*x[j])**3/ (sum {j in OBS} b[j]*x[j]);
read data bounds into OBS=[_N_] x.lb=lb x.ub=ub a b;
solve with nlp/multistart ;
print x;
quit;
This way, you can run again with different data without changing the PROC OPTMODEL code. Such separation of model and data is a best practice enabled by the use of an algebraic modeling language.
... View more