SAS- How to split a large dataset by certain requirements?
<pre><code>data AXPM061204200; 
set a; 
call execute ("data work.data_"||strip(put(_ric,$13.))||"_"||strip(put(date,yymmddn8.))||"; 
               set work.a;if date="||date||" and _ric="||input(_ric,$13.)||";run;"); 
run;
</code></pre>

<p>I have a large dataset that contians multiple date (from 20120103 to 20121205) and contracts (_ric= AXPM061204200.c, AXPC061204200.c and so on).</p>

<p>I tried to use "call exectue" to split the dataset and here is my code. It can only split by date, but fail in contract name (_ric). The error was : Variable AXPM061203800 is uninitialized. How could I solve this problem.</p>