Dear SAS users:
I would like to have an output dataset using id AT ATvol
cofor {i in row} do;
id = i;
solve;
/* Save each individual solution */
ATsol[id] = AT.sol;
AT_Volsol[id] = AT_vol.sol;
if id=1 then do;
create data solutionAT from AT.sol;
create data solutionATVol from AT_vol.sol;
end;
if id>1 then do;
create data solutionAT_temp from AT.sol;
create data solutionATVol_temp from AT_vol.sol;
end;
This is an extract from proc optmodel: I tried to have data step and append functions but this does not work.
I would appreciate your help
Many thanks
Best regards,
George
num ATsol {row};
num AT_Volsol {row};
cofor {i in row} do;
id = i;
solve;
/* Save each individual solution */
ATsol[id] = AT.sol;
AT_Volsol[id] = AT_vol.sol;
end;
create data solutionAT from [i] ATsol;
create data solutionATVol from [i] AT_Volsol;
num ATsol {row};
num AT_Volsol {row};
cofor {i in row} do;
id = i;
solve;
/* Save each individual solution */
ATsol[id] = AT.sol;
AT_Volsol[id] = AT_vol.sol;
end;
create data solutionAT from [i] ATsol;
create data solutionATVol from [i] AT_Volsol;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.