IML Workshop eliminates this limitation by enabling you to utilize DATA and PROC step functionality without losing the state of your IMLPlus program. IML Workshop enables you to access other components of SAS as subroutines to your IMLPlus program. This is a very powerful capability because it means that you can access any statistical procedure provided by SAS from within an IMLPlus program.
Example
/* generate data */
x = t( do( -3, 3, .1 ) );
x2 = x##2;
y = x2 + 3*x - 2 + 3*normal( j( nrow(x), 1, 12345 ) );
declare ScatterPlot plot;
plot = ScatterPlot.Create("Linear Regression", x, y);
/* save to a data set */
create imldata var{ x, x2, y };
append;
close imldata;
/* define options for the REG procedure */
options = "simple corr";
/* call the REG procedure to compute a linear fit
without leaving the IML program */
submit options; /* pass in value of IML variable */
proc reg data=imldata &options;
model y=x x2;
output out=regfit p=pred;
run;
endsubmit;
/* read the predicted value computed by REG into a vector */
use regfit;
read all var {pred} into pred;
close regfit;
/* continue the IML program */
plot.DrawUseDataCoordinates();
plot.DrawLine(x,pred);

Statistics and Operations Research Home Page | SAS/IML Workshop