Although DS2 is supported
by both SAS Foundation and SAS Micro Analytic Service, SAS Micro Analytic
Service has a lightweight, high-performance engine that does not support
either the full SAS language or PROC statements. Therefore, PROC statements
cannot be used. However, here is an effective DS2 authoring and testing
mechanism: develop your DS2 packages in SAS Foundation using PROC
DS2 and publish those packages to SAS Micro Analytic Service after
removing the surrounding PROC DS2 syntax.
Here is an example PROC
DS2 step that illustrates the above mechanism:
proc ds2;
ds2_options sas;
package myPackage/overwrite=yes;
method copyArray(char(12) in_array[4], in_out char(12) out_array[4]);
out_array := in_array;
end;
endpackage;
run;
table _null_;
method init();
dcl package myPackage p();
dcl char(12) inarr[4];
dcl char(12) outarr[4];
inarr[1] = 'one';
inarr[2] = 'two';
inarr[3] = 'three';
p.copyArray(inarr, outarr);
put outarr[1]=;
put outarr[2]=;
put outarr[3]=;
end;
run;
quit;