1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| data client_moisB;
infile datalines delimiter=',';
input client $ mois $ valeurs $;
datalines;
Dupont,jan,v1j
Dupont,fev,v1f
Dupont,mar,v1m
Durant,jan,v2j
Durant,fev,v2f
Durant,mar,v2m
Martin,jan,vMartinj
Martin,fev,vMartinf
Martin,mar,vMartinm,
;run;
%macro A3;
proc sort data=client_moisB;by client;run;
data client_mois2C; set client_moisB;by client;
retain compteur 0;
if first.client then compteur=compteur+1;
*client_num=input(client,3.);
client_number= compress(compteur|| "_" || client,' ');run;
proc print data=client_mois2C;
run;
%mend;
%A3; |
Partager