|
let's assume <span style="font-style: italic;">ownerage, model, </span>and <span style="font-style: italic;">carage </span>are characters in a data set called 'xxx'.<br/>build 3 informats first,<br/>proc format;<br/>invalue ownerage<br/>'17-20'=1<br/>'21-24'=2<br/>...<br/>;<br/>invalue model<br/>'A'=1<br/>'B'=2<br/>'C'=3<br/>'D'=4<br/>;<br/>invalue carage<br/>'0-3'=1<br/>...<br/>;<br/><br/>Then the records can be loaded into arrays as follows:<br/><br/>data _null_;<br/>array x[8,4,4] _temporary_;<br/>array y[8,4,4] _temporary_;<br/>do until (eof);<br/>set xxx end = eof;<br/>x[input(ownerage, ownerage.), input(model, model.), input(carage, carage.)] = nclaims;<br/>
y[input(ownerage, ownerage.), input(model, model.), input(carage, carage.)] = avcost;<br/>end;<br/>/*<br/>arrays x and y are loaded here<br/>*/<br/>stop;<br/>run;<br/>
<br/>
|