Hi Rick, in Proc IML it is possible to STORE Matrices and Modules in each Proc IML Step in an additive way. So store Module1 in first Proc IML, Module2 in second Proc Iml. and load all Modules in third Proc IML in the same session without necessity to make load statement in the second proc iml. But using cas this leads to an error: Module1 not found in case of invoking Module1 in the third cas procedure. Ist there a solution to solve this without making load statement in every proc cas procedure (because it is resource intensive if we have a lot of modules in seperate files and big matrices and if we want to just to add another module into to overall store)? Thanks, David and Adalbert!

Example Code:
/*Store and Load with PROC IML*/

proc iml;
start func_1(m);
measure = 2#m;
return (measure);
finish func_1;
store ;*module = cashflow_v;
quit;

proc iml;
start func_2(m);
measure = 4#m;
return (measure);
finish func_2;
store ;*module = cashflow_v;
quit;

proc iml;
load;
m1 = func_1({1 1});
print(m1);
quit;

/*Store and Load with CAS loadactionset iml*/

proc cas;
loadactionset "iml";
source iml_code;
start func_1(m);
measure = 2#m;
return (measure);
finish func_1;
store ;*module = cashflow_v;
endsource;
iml / code=iml_code;
run;
quit;

proc cas;
loadactionset "iml";
source iml_code;
start func_2(m);
measure = 4#m;
return (measure);
finish func_2;
store ;*module = cashflow_v;
endsource;
iml / code=iml_code;
run;
quit;

proc cas;
loadactionset "iml";
source iml_code;
load;
m1 = func_1({1 1});
print(m1);
endsource;
iml / code=iml_code;
run;
quit;

ERROR:

135
136 proc cas;
137 loadactionset "iml";
138 source iml_code;
139 load;
140 m1 = func_1({1 1});
141 print(m1);
142 endsource;
143 iml / code=iml_code;
144 run;
NOTE: Active Session now MYSESSION.
NOTE: Added action set 'iml'.
ERROR: Invocation of unresolved module FUNC_1.
statement : ASSIGN at line 2 column 2
----Source lines near the error----
1: load;
* 2: m1 = func_1({1 1});
-----------------------------------
ERROR: The action stopped due to errors.
145 quit;
NOTE: PROZEDUR CAS used (Total process time):
real time 0.18 Sekunden
cpu time 0.03 Sekunden