3# baoaibaobao
谢谢楼上的回复。。。。。
dm 'clear log; clear output';
libname lib 'D:\projet sas stata';
proc contents data=lib.INSERTION;run;
data lib.question1 ;
set lib.INSERTION;
retain;
array a(63) SIT4V01 SIT4V02 SIT4V03 SIT4V04 SIT4V05 SIT4V06 SIT4V07 SIT4V08 SIT4V019 SIT4V10 SIT4V11 SIT4V12 SIT4V13 SIT4V14 SIT4V15 SIT4V16 SIT4V17 SIT4V18 SIT4V19 SIT4V20 SIT4V21 SIT4V22 SIT4V23 SIT4V24 SIT4V25 SIT4V26 SIT4V27 SIT4V28 SIT4V29 SIT4V30 SIT4V31 SIT4V32 SIT4V33 SIT4V34 SIT4V35 SIT4V36 SIT4V37 SIT4V38 SIT4V39 SIT4V40 SIT4V41 SIT4V42 SIT4V43 SIT4V44 SIT4V45 SIT4V46 SIT4V47 SIT4V48 SIT4V49 SIT4V50 SIT4V51 SIT4V52 SIT4V53 SIT4V54 SIT4V55 SIT4V56 SIT4V57 SIT4V58 SIT4V59 SIT4V60 SIT4V61 SIT4V62 SIT4V63;
chomage=0;
enploinonaide=0;
emploi_aide=0;
inactivite=0;
do i=1 to dim(a);
if a(i)=17 then chomage=chomage+1;
if a(i)=1 then enploinonaide=enploinonaide+1;
if a(i)=2 then enploinonaide=enploinonaide+1;
if a(i)=8 then enploinonaide=enploinonaide+1;
if a(i)=9 then enploinonaide=enploinonaide+1;
if a(i)=10 then enploinonaide=enploinonaide+1;
if a(i)=11 then enploinonaide=enploinonaide+1;
if a(i)=3 then emploi_aide=emploi_aide+1;
if a(i)=4 then emploi_aide=emploi_aide+1;
if a(i)=5 then emploi_aide=emploi_aide+1;
if a(i)=6 then emploi_aide=emploi_aide+1;
if a(i)=7 then emploi_aide=emploi_aide+1;
if a(i)=13 then emploi_aide=emploi_aide+1;
if a(i)=14 then emploi_aide=emploi_aide+1;
if a(i)=12 then inactivite=inactivite+1;
if a(i)=15 then inactivite=inactivite+1;
if a(i)=18 then inactivite=inactivite+1;
end;
keep chomage emploinonaide emploi_aide inactivite;
run;
proc print;run;
这是我按照你的方法,然后修改了一下。你看看什么地方应该改进的呢????
谢谢哦