In reply to Scott Bass.

The closest thing to a "fancy new SAS language" would be CASL:

proc cas;

function foo(a,b);
return(a**b);
end;

foo=newtable("foo", {'x','y','z'}, {'int64','int64','int64'});
do x = 1 to 10;
do y = 1 to 5;
z = foo(x,y);
row = {x, y, z};
addrow(foo, row);
end;
end;
saveresult foo casout="foo";

simple.numRows result=r / table="foo";
if r.numrows = 0 then do;
print "foo is empty";
end;

do name over {'class','stocks','shoes'};
datastep.runCode /
code = "data "||catx(".","casuser",name)||";
set "||catx(".","public",name)||";
run;";
end;

quit;

I wrote this using a SAS client, so I still have PROC boundaries, and the submitted DATA step is still a string. It's similar to the above example but allows for a mix of "old" and "new" SAS language components.