%*******************************************; %* Olivier Godechot, V3.0 le 17.09.2007 *; %*******************************************; %* Macro faisant des comptages *; %* simples de mots sur fichier textes *; %* ou sur variables textuelles. *; %* Faisant une petite AFC catégories*mots *; %* Ou une ACM avec *; %* instruction VAR *; %*******************************************; %Macro Anatext(where, keep, var,fichier,traitem=1,data=_last_,recol=Non,minlong=2,minfreq=9,Majuscul=OUI,Accents=OUI,Ecran=Oui, motpara=200,nouvtext=,afc=0,indivafc=1,mat=0,acm=0,indiv=1,motoutil=NON,basoutil=MONLIB.MOTOUTIL); %window Accueil0 #1 @10 "Bonjour" #2 @1 "Type de traitement" #3 @3 "1. Variable textuelle au sein d´une base SAS" #4 @3 "2. Texte" #6 @5 traitem 2 attr=rev_video auto=yes #10 @1 "Syntaxe complete : " #11 @1 %nrstr("%Anatext(where, keep, var,fichier,traitem=,data=,") #12 @1 %nrstr("recol=,minlong=,minfreq=,Majuscul=,Accents=,Ecran=,") #13 @1 %nrstr("motpara=,nouvtext=,acm=,indiv=,motoutil=,basoutil=);") #15 @20 "Appuyez sur entrée et bonne suite, Olivier Godechot, le 03/02/2000" ; %window Accueil1 #1 @1 "Inscrivez le nom de votre base : (data=)" @ 43 data 17 attr=rev_video auto=yes #3 @1 "Inscrivez le nom des variables à analyser : (var=)" @ 52 var 30 attr=rev_video auto=yes #5 @1 "Doit-on recoller ces variables (mots coupés en deux) : (recol=)" @ 65 Recol 3 attr=rev_video auto=yes #7 @1 "Garder des variables de croisement : (keep=)" @ 46 keep 30 attr=rev_video auto=yes #9 @1 "Fréquence minimale d´édition des résultats : (minfreq=)" @ 57 minfreq 4 attr=rev_video auto=yes #11 @1 "Longueur minimale des mots pour l´edition : (minlong=)" @ 56 minlong 4 attr=rev_video auto=yes #13 @1 "Confusion majuscule miniscule : (majuscul=)" @ 50 majuscul 3 attr=rev_video auto=yes #15 @1 "Suppresion des accents : (accents=)" @ 40 accents 3 attr=rev_video auto=yes #17 @1 "Clause restrictive : (where=)" #18 @1 where 80 attr=rev_video auto=yes #20 @1 "Identification des « mots outils » : motoutil= "@ 55 motoutil 3 attr=rev_video auto=yes #21 @1 "Base SAS des « mots outils » : basoutil= "@ 55 basoutil 17 attr=rev_video auto=yes #23 @1 "AFC du tableau lignes* mots>seuil : 0. Non 1. Mots. afc="@ 78 afc 2 attr=rev_video auto=yes #24 @1 "Avec comme lignes 1. les modalités de croisement, 2. les individus (long). indivafc=" @ 86 indivafc 2 attr=rev_video auto=yes #27 @1 "Matrice sur la base des mots (long): 0. Non 1. Mots 2. Mots et segments. mat="@ 78 mat 2 attr=rev_video auto=yes #28 @1 "ACM sur la base des mots (long) : 0. Non 1. Mots. acm="@ 78 acm 2 attr=rev_video auto=yes #29 @1 "Avec pour unités d'analyse les 1. Observations, 2. UCE (suite) de 10 mots. indiv=" @ 82 indiv 2 attr=rev_video auto=yes ; %window Accueil2 #1 @3 "Inscrivez ci-dessous le nom du chemin du fichier texte." #2 @1 "Exemple : c:\amoi\montexte.txt " #3 @1 fichier 200 attr=rev_video auto=yes #5 @1 "Fréquence minimale d´édition des résultats : minfreq=" @ 55 minfreq 4 attr=rev_video auto=yes #7 @1 "Longueur minimale des mots pour l´édition : minlong=" @ 55 minlong 4 attr=rev_video auto=yes #9 @1 "Nombre maximum de mots par paragraphe : motpara= " @ 55 motpara 4 attr=rev_video auto=yes #11 @1 "Confusion majuscule miniscule : majuscul=" @ 55 majuscul 3 attr=rev_video auto=yes #13 @1 "Suppresion des accents : accents= " @ 55 accents 3 attr=rev_video auto=yes #15 @1 "Identification des « mots outils » : motoutil="@ 55 motoutil 3 attr=rev_video auto=yes #16 @1 "Base SAS des « mots outils » : basoutil="@ 55 basoutil 17 attr=rev_video auto=yes #18 @1 "Délimitateur spécial de textes : nouvtext=" @ 55 nouvtext 5 attr=rev_video auto=yes #20 @1 "AFC du tableau lignes* mots>seuil : 0. Non 1. Mots. afc="@ 78 afc 2 attr=rev_video auto=yes #21 @1 "Avec comme lignes les 1. Textes, 2. Phrases (long)" #22 @20 "3. Paragraphes, 4. UCE (suite) de 10 mots. indiv=" @ 78 indivafc 2 attr=rev_video auto=yes #25 @1 "Matrice sur la base des mots (long): 0. Non 1. Mots 2. Mots et segments. mat="@ 78 mat 4 attr=rev_video auto=yes #26 @1 "ACM sur la base des mots (long) : 0. Non 1. Mots. acm="@ 78 acm 4 attr=rev_video auto=yes #27 @1 "Avec pour unités d'analyse les 1. Phrases, 2. UCE (suite) de 10 mots" #28 @20 "3. Paragraphes, 4. Textes. indiv=" @ 78 indiv 2 attr=rev_video auto=yes ; %if &Ecran=Oui %then %do; %display Accueil0; %if &traitem=1 %then %do; %display Accueil1; %end; %else %do; %display Accueil2; %end; %end; %if &traitem=2 %then %goto texte; %let dat0=_%substr(%scan(&var,1),1,5)0_; %let dat1=_%substr(%scan(&var,1),1,5)1_; %let dat2=_%substr(%scan(&var,1),1,5)2_; %let dat3=_%substr(%scan(&var,1),1,5)3_; %let dat4=_%substr(%scan(&var,1),1,5)4_; %let dat5=_%substr(%scan(&var,1),1,5)5_; %let dat6=_%substr(%scan(&var,1),1,5)6_; %let dat7=_%substr(%scan(&var,1),1,5)7_; %let dat8=_%substr(%scan(&var,1),1,5)8_; %let dat9=_%substr(%scan(&var,1),1,5)9_; %let dat10=_%substr(%scan(&var,1),1,5)A_; %let dat11=_%substr(%scan(&var,1),1,5)B_; %let var0=__%substr(%scan(&var,1),1,4)__; %let Majuscul=%upcase(&Majuscul); %let Accents=%upcase(&Accents); %let motoutil=%upcase(&motoutil); %let basoutil=%upcase(&basoutil); %let recol=%upcase(&recol); %let wher=(&where); *0.1 Sous-programme pour traiter des suites de variables de type V1-V10 et AA--ZZ; %let tiret1=%str( -); %do %while (%index(&keep,&tiret1)>0); %let long=%index(&keep,&tiret1); %let keep=%qsubstr(&keep,1,&long-1)%str(-)%qsubstr(&keep,&long+2); %end; %do %while (%index(&var,&tiret1)>0); %let long=%index(&var,&tiret1); %let var=%qsubstr(&var,1,&long-1)%str(-)%qsubstr(&var,&long+2); %end; %let tiret2=%str(- ); %do %while (%index(&keep,&tiret2)>0); %let long=%index(&keep,&tiret2); %let keep=%qsubstr(&keep,1,&long-1)%str(-)%qsubstr(&keep,&long+2); %end; %do %while (%index(&var,&tiret2)>0); %let long=%index(&var,&tiret2); %let var=%qsubstr(&var,1,&long-1)%str(-)%qsubstr(&var,&long+2); %end; %if %index(&var,--)>0 or %index(&keep,--)>0 %then %do; proc contents data=&data noprint; run; %end; %do %while (%index(&keep,--)>0); %let i=1; %do %while(%index(%scan(&keep,&i,%str( )),--)=0); %let i=%eval(&i+1); %end; %let long2=%length(%scan(&keep,&i,%str( ))); %let Vd=%scan(&keep,&i); %let long=%index(&keep,&vd); %let Vf=%scan(&keep,&i+1); %local z; %local zz; %let z=%sysfunc(open(&data)); %let posd=%sysfunc(varnum(&z,&vd)); %let posf=%sysfunc(varnum(&z,&vf)); %let j=%eval(&posd+1); %let blanc=%str( ); %let ttevar=&vd&blanc; %do %while (&j<&posf); %let vj=%sysfunc(varname(&z,&j)); %let ttevar=&ttevar&vj&blanc; %let j=%eval(&j+1); %end; %let ttevar=&ttevar&vf; %let zz=%sysfunc(close(&z)); %let keep=%qsubstr(&keep,1,&long-1)%str(&ttevar)%qsubstr(&keep,&long+&long2); %end; %do %while (%index(&keep,-)>0); %let i=1; %do %while(%index(%scan(&keep,&i,%str( )),-)=0); %let i=%eval(&i+1); %end; %let long2=%length(%scan(&keep,&i,%str( ))); %let Vd=%scan(&keep,&i); %let long=%index(&keep,&vd); %let Vf=%scan(&keep,&i+1); %let k=%length(&Vd); %do %while(%verify(%substr(&vd,&k),0123456789)=0); %let posd=%substr(&vd,&k); %let k=%eval(&k-1); %end; %let k=%length(&Vf); %do %while(%verify(%substr(&vf,&k),0123456789)=0); %let posf=%substr(&vf,&k); %let k=%eval(&k-1); %end; %let j=%eval(&posd+1); %let blanc=%str( ); %let ttevar=&vd&blanc; %do %while (&j<&posf); %let vj=%substr(&vd,1,&k); %let ttevar=&ttevar&vj&j&blanc; %let j=%eval(&j+1); %end; %let ttevar=&ttevar&vf; %let keep=%qsubstr(&keep,1,&long-1)%str(&ttevar)%qsubstr(&keep,&long+&long2); %end; %do %while (%index(&var,--)>0); %let i=1; %do %while(%index(%scan(&var,&i,%str( )),--)=0); %let i=%eval(&i+1); %end; %let long2=%length(%scan(&var,&i,%str( ))); %let Vd=%scan(&var,&i); %let long=%index(&var,&vd); %let Vf=%scan(&var,&i+1); %local z; %local zz; %let z=%sysfunc(open(&data)); %let posd=%sysfunc(varnum(&z,&vd)); %let posf=%sysfunc(varnum(&z,&vf)); %let j=%eval(&posd+1); %let blanc=%str( ); %let ttevar=&vd&blanc; %do %while (&j<&posf); %let vj=%sysfunc(varname(&z,&j)); %let ttevar=&ttevar&vj&blanc; %let j=%eval(&j+1); %end; %let ttevar=&ttevar&vf; %let zz=%sysfunc(close(&z)); %let var=%qsubstr(&var,1,&long-1)%str(&ttevar)%qsubstr(&var,&long+&long2); %end; %do %while (%index(&var,-)>0); %let i=1; %do %while(%index(%scan(&var,&i,%str( )),-)=0); %let i=%eval(&i+1); %end; %let long2=%length(%scan(&var,&i,%str( ))); %let Vd=%scan(&var,&i); %let long=%index(&var,&vd); %let Vf=%scan(&var,&i+1); %let k=%length(&Vd); %do %while(%verify(%substr(&vd,&k),0123456789)=0); %let posd=%substr(&vd,&k); %let k=%eval(&k-1); %end; %let k=%length(&Vf); %do %while(%verify(%substr(&vf,&k),0123456789)=0); %let posf=%substr(&vf,&k); %let k=%eval(&k-1); %end; %let j=%eval(&posd+1); %let blanc=%str( ); %let ttevar=&vd&blanc; %do %while (&j<&posf); %let vj=%substr(&vd,1,&k); %let ttevar=&ttevar&vj&j&blanc; %let j=%eval(&j+1); %end; %let ttevar=&ttevar&vf; %let var=%qsubstr(&var,1,&long-1)%str(&ttevar)%qsubstr(&var,&long+&long2); %end; * Suite ; %let posfk=0; %Let l=1; %let vark=%scan(&keep,&l); %Let inputk=; %do %while (&vark NE); %let z=%sysfunc(open(&data)); %let lonk=%sysfunc(varlen(&z,%sysfunc(varnum(&z,&vark)))); %let typek=%sysfunc(vartype(&z,%sysfunc(varnum(&z,&vark)))); %let zz=%sysfunc(close(&z)); %if &typek=C %then %do; %let typek=$; %end; %else %do; %let typek=; %end; %let posdk=%eval(&posfk+1); %let posfk=%eval(&posfk+&lonk); %let blanc=%str( ); %let inputk= &inputk&vark&blanc&typek&posdk-&posfk&blanc; %let l=%eval(&l+1); %let vark=%scan(&keep,&l); %end; %Let l=1; %let longtot=0; %let varo=%scan(&var,&l); %let crecol=1; %if &recol=OUI %then %let crecol=0; %let posfv=%eval(&posfk+1-&crecol); %Let inputv=; %do %while (&varo NE); %let z=%sysfunc(open(&data)); %let long=%sysfunc(varlen(&z,%sysfunc(varnum(&z,&varo)))); %let zz=%sysfunc(close(&z)); %let posdv=%eval(&posfv+1+&crecol); %let posfv=%eval(&posfv+&long+&crecol); %let blanc=%str( ); %let inputv= &inputv&varo&blanc&posdv-&posfv&blanc; %let longtot=%eval(&longtot+&long+&crecol); %let l=%eval(&l+1); %let varo=%scan(&var,&l); %end; %if &longtot>32500 %then %goto grosvar; %if %UPCASE(&recol)=OUI %then %do; %let l=1; %let varl=_%substr(%scan(&var,&l),1,5)&l._; %let fusion=_%substr(%scan(&var,&l),1,5)&l._; %let l=%eval(&l+1); %let varl=_%substr(%scan(&var,&l),1,5)&l._; %let varil=%scan(&var,&l); %do %while (&varil NE); %let fusion=&fusion%str( !! )_%substr(%scan(&var,&l),1,5)&l._; %let l=%eval(&l+1); %let varl=_%substr(%scan(&var,&l),1,5)&l._; %let varil=%scan(&var,&l); %end; %end; %else %do; %let l=1; %let varl=_%substr(%scan(&var,&l),1,5)&l._; %let fusion=_%substr(%scan(&var,&l),1,5)&l._; %let l=%eval(&l+1); %let varl=_%substr(%scan(&var,&l),1,5)&l._; %let varil=%scan(&var,&l); %do %while (&varil NE); %let fusion=&fusion%str( !! " " !!)_%substr(%scan(&var,&l),1,5)&l._; %let l=%eval(&l+1); %let varl=_%substr(%scan(&var,&l),1,5)&l._; %let varil=%scan(&var,&l); %end; %end; data &dat1; run; %put %str(data &dat1; run;); data &dat1 (keep= mot longueur numindiv nummot &keep); %put %str(data &dat1 (keep= mot longueur numindiv nummot &keep); ); %if &wher NE () %then %do; set &data (where=&wher); %put %str(set &data (where=&wher);); %end; %else %do; set &data; %put %str(set &data;); %end; %Let l=1; %let longtot=0; %let varo=%scan(&var,&l); %let varl=_%substr(%scan(&var,&l),1,5)&l._; %do %while (&varo NE); %let z=%sysfunc(open(&data)); %let long=%sysfunc(varlen(&z,%sysfunc(varnum(&z,&varo)))); %let zz=%sysfunc(close(&z)); %let longtot=%eval(&longtot+&long); length &varl $&long; %put %str(length &varl $&long;); &varl=&varo; %put %str(&varl=&varo;); %let diacrit="%nrquote(""''.´,;:!?/-`+=*$^()&<>–’‘“”«»)"; &varl=translate(&varl," ",&diacrit); %put %str(&varl=translate(&varl," ",&diacrit);); %let l=%eval(&l+1); %let varo=%scan(&var,&l); %let varl=_%substr(%scan(&var,&l),1,5)&l._; %end; length mot $30; %put %str(length mot $30;); i=1; %put %str(i=1;); do while (scan(&fusion,i) NE ""); %put %str(do while (scan(&fusion,i) NE "");); numindiv=_N_; %put %str(numindiv=_N_;); mot=scan(&fusion,i); %put %str(mot=scan(&fusion,i);); %if &Accents=OUI %then %do; mot=translate(mot,"eeeeaaauuuiiooycEEEEAAAUUUIIOOC", "éèêëàâäùûüîïôöÿçÉÈÊËÀÂÄÙÜÛÎÏÔÖÇ"); %put %str(mot=translate(mot,"eeeeaaauuuiiooycEEEEAAAUUUIIOOC","éèêëàâäùûüîïôöÿçÉÈÊËÀÂÄÙÜÛÎÏÔÖÇ");); %put %str(*Suppression des accents;); %end; %if &Majuscul=OUI %then %do; mot=Upcase(mot); %put %str(mot=Upcase(mot);); %put %str(*Confustion Majuscule minuscule;); %end; longueur=length(mot); %put %str(longueur=length(mot);); nummot+1; %put %str( nummot+1;); output &dat1; %put %str(output &dat1;); i+1; %put %str(i+1;); end; %put %str(end;); %put %str(run;); run; %let z=%sysfunc(open(&dat1)); %let rate=%sysfunc(attrn(&z,nvars)); %let rate2=%sysfunc(attrn(&z,nobs)); %let zz=%sysfunc(close(&z)); %if &rate=0 or &rate2=0 %then %goto rate; %goto edition; %grosvar : ; %let motpara=%eval(&longtot/3); %let vn=v&motpara; data _null_; %put %str(data _null_;); %if &wher NE () %then %do; set &data (where=&wher); %put %str(set &data (where=&wher);); %end; %else %do; set &data; %put %str(set &data;); %end; file "c:\texte.tmp" lrecl=30000; %put %str(file "c:\texte.tmp";); put &inputk &inputv; %put %str(put &inputk &inputv;); run; data &dat1; run; %put %str(data &dat1; run;); data &dat1 (keep=mot longueur numindiv nummot &keep); infile "c:\texte.tmp" lrecl=30000 missover; %put %str(data &dat1 (keep=mot longueur numindiv nummot &keep);); %put %str(infile "c:\texte.tmp" lrecl=30000 missover;); length v1-&vn $ 30; %put %str(length v1-&vn $ 30;); input &inputk (v1-&vn) ($); %put %str(input &inputk (v1-&vn) ($);); if v1 not=" "; %put %str(if v1 not=" ";); array a(&motpara) $ v1-&vn; %put %str(array a(&motpara) $ v1-&vn;); do i =1 to &motpara; %put %str(do i =1 to &motpara;); if a(i) NE "" then do; %put %str(if a(i) NE "" then do;); Numindiv=_N_; %put %str(Numindiv=_N_;); a(i)=translate(a(i)," ", "<>^&$+=!*"",.:;`()/%?_ -´‘’'«»“”–"); %put %str(a(i)=translate(a(i)," ","<>^&$+=!*"",.:;`()/%?_ -´‘’'«»“”–");); a(i)=compbl(a(i)); %put %str(a(i)=compbl(a(i));); if index(a(i)," ")=0 then do; %put %str(if index(a(i)," ")=0 then do;); mot=a(i); %put %str(mot=a(i);); %if &Accents=OUI %then %do; mot=translate(mot,"eeeeaaauuuiiooycEEEEAAAUUUIIOOC", "éèêëàâäùûüîïôöÿçÉÈÊËÀÂÄÙÜÛÎÏÔÖÇ"); %put %str(mot=translate(mot,"eeeeaaauuuiiooycEEEEAAAUUUIIOOC","éèêëàâäùûüîïôöÿçÉÈÊËÀÂÄÙÜÛÎÏÔÖÇ");); %put %str(*Sans accents;); %end; %if &Majuscul=OUI %then %do; mot=Upcase(mot); %put %str(mot=Upcase(mot);); %put %str(*Tout en Majuscule;); %end; longueur=length(mot); %put %str(longueur=length(mot);); nummot+1; %put %str(nummot+1;) output &dat1; %put %str(output &dat1;); end; %put %str(end;); else do; %put %str(else do;); n=1; %put %str(n=1;); do while (scan(a(i),n) NE ""); %put %str(do while (scan(a(i),n) NE "");); mot=scan(a(i),n); %put %str(mot=scan(a(i),n);); %if &Accents=OUI %then %do; mot=translate(mot,"eeeeaaauuuiiooycEEEEAAAUUUIIOOC", "éèêëàâäùûüîïôöÿçÉÈÊËÀÂÄÙÜÛÎÏÔÖÇ"); %put %str(mot=translate(mot,"eeeeaaauuuiiooycEEEEAAAUUUIIOOC","éèêëàâäùûüîïôöÿçÉÈÊËÀÂÄÙÜÛÎÏÔÖÇ");); %put %str(* Sans accents;); %end; %if &Majuscul=OUI %then %do; mot=Upcase(mot); %put %str(mot=Upcase(mot);); %put %str(* Tout en Majuscule;); %end; longueur=length(mot); %put %str(longueur=length(mot);); nummot+1; %put %str(nummot+1); output &dat1; %put %str(output &dat1;); n+1; %put %str(n+1;); end; %put %str(end;); end; %put %str(end;); end; %put %str(end;); end; %put %str(end;); %put %str(run;); run; %let z=%sysfunc(open(&dat1)); %let rate=%sysfunc(attrn(&z,nvars)); %let zz=%sysfunc(close(&z)); %if &rate=0 %then %goto rate; %goto edition; %texte : ; %let fichier=%scan(&fichier,1, ); %let Majuscul=%upcase(&Majuscul); %let Accents=%upcase(&Accents); %let nouvtext=%upcase(&nouvtext); %let vn=v&motpara; %let l=3; %let varil=%scan(&fichier,&l, : .\/); %do %while (&varil NE); %let m=%eval(&l-1); %let nom=%scan(&fichier,&m, : .\/ ); %let l=%eval(&l+1); %let varil=%scan(&fichier,&l, : .\/ ); %end; %let dat0=_%substr(%scan(&nom,1),1,5)0_; %let dat1=_%substr(%scan(&nom,1),1,5)1_; %let dat2=_%substr(%scan(&nom,1),1,5)2_; %let dat3=_%substr(%scan(&nom,1),1,5)3_; %let dat4=_%substr(%scan(&nom,1),1,5)4_; %let dat5=_%substr(%scan(&nom,1),1,5)5_; %let dat6=_%substr(%scan(&nom,1),1,5)6_; %let dat7=_%substr(%scan(&nom,1),1,5)7_; %let dat8=_%substr(%scan(&nom,1),1,5)8_; %let dat9=_%substr(%scan(&nom,1),1,5)9_; %let dat10=_%substr(%scan(&nom,1),1,5)A_; %let dat11=_%substr(%scan(&nom,1),1,5)B_; %let var0=__%substr(%scan(&nom,1),1,4)__; data &dat1; run; %put %str(data &dat1; run;); data &dat1 (keep=mot NumParag longueur NumText NumPhras nummot); infile "&fichier" lrecl=30000 missover; %put %str(data &dat1 (keep=mot NumParag longueur NumText NumPhras nummot);); %put %str(infile "&fichier" lrecl=30000 missover;); length v1-&vn $ 30; %put %str(length v1-&vn $ 30;); input (v1-&vn) ($); %put %str(input (v1-&vn) ($);); if v1 not=" "; %put %str(if v1 not=" ";); array a(&motpara) $ v1-&vn; %put %str(array a(&motpara) $ v1-&vn;); do i =1 to &motpara; %put %str(do i =1 to &motpara;); if a(i) NE "" then do; %put %str(if a(i) NE "" then do;); %if &nouvtext NE %then %do; nouvtext=(index(Upcase(a(i)),"&nouvtext")>0); %put %str(nouvtext=(index(Upcase(a(i)),"&nouvtext")>0);); indi+nouvtext; %put %str(indi+nouvtext;); NumText=indi+1; %put %str(NumText=indi+1;); %end; %else %do; NumText=1; %put %str(NumText=1;); %end; Parag=_N_; %put %str(Parag=_N_;); phrasea=(indexc(a(i),"?",".","!",":")>0); %put %str(phrasea=(indexc(a(i),"?",".","!",":")>0);); phraseb+max(lag(phrasea),0,(dif(parag)>0)); %put %str(phrasea=(indexc(a(i),"?",".","!",":")>0);); parag2+max(0,(dif(parag)>0)); %put %str(parag2+max(0,(dif(parag)>0));); Numparag=parag2+1; %put %str(Numparag=parag2+1;); NumPhras=phraseb+1; %put %str(NumPhras=phraseb+1;); a(i)=translate(a(i)," ", "<>^&$+!*"",.:;`()/%?_ -´’‘'«»“”–"); %put %str(a(i)=translate(a(i)," ", "<>^&$+!*"",.:;`()/%?_ -´’‘'«»“”–");); a(i)=compbl(a(i)); %put %str(a(i)=compbl(a(i));); if index(a(i)," ")=0 then do; %put %str(if index(a(i)," ")=0 then do;); mot=a(i); %put %str(mot=a(i);); %if &Accents=OUI %then %do; mot=translate(mot,"eeeeaaauuuiiooycEEEEAAAUUUIIOOC", "éèêëàâäùûüîïôöÿçÉÈÊËÀÂÄÙÜÛÎÏÔÖÇ"); %put %str(mot=translate(mot,"eeeeaaauuuiiooycEEEEAAAUUUIIOOC","éèêëàâäùûüîïôöÿçÉÈÊËÀÂÄÙÜÛÎÏÔÖÇ");); %put %str(*Sans accents;); %end; %if &Majuscul=OUI %then %do; mot=Upcase(mot); %put %str(mot=Upcase(mot);); %put %str(*Tout en Majuscule;); %end; longueur=length(mot); %put %str(longueur=length(mot);); nummot+1; %put %str( nummot+1;); output &dat1; %put %str(output &dat1;); end; %put %str(end;); else do; %put %str(else do;); n=1; %put %str(n=1;); do while (scan(a(i),n) NE ""); %put %str(do while (scan(a(i),n) NE "");); mot=scan(a(i),n); %put %str(mot=scan(a(i),n);); %if &Accents=OUI %then %do; mot=translate(mot,"eeeeaaauuuiiooycEEEEAAAUUUIIOOC", "éèêëàâäùûüîïôöÿçÉÈÊËÀÂÄÙÜÛÎÏÔÖÇ"); %put %str(mot=translate(mot,"eeeeaaauuuiiooycEEEEAAAUUUIIOOC","éèêëàâäùûüîïôöÿçÉÈÊËÀÂÄÙÜÛÎÏÔÖÇ");); %put %str(* Sans accents;); %end; %if &Majuscul=OUI %then %do; mot=Upcase(mot); %put %str(mot=Upcase(mot);); %put %str(* Tout en Majuscule;); %end; longueur=length(mot); %put %str(longueur=length(mot);); nummot+1; %put %str( nummot+1;); output &dat1; %put %str(output &dat1;); n+1; %put %str(n+1;); end; %put %str(end;); end; %put %str(end;); end; %put %str(end;); end; %put %str(end;); %put %str(run;); run; %let z=%sysfunc(open(&dat1)); %let rate=%sysfunc(attrn(&z,nvars)); %let zz=%sysfunc(close(&z)); %if &rate=0 %then %goto rate; %goto edition; %edition : ; data &dat1; set &dat1; %put %str(data &dat1; set &dat1;); length motlag motlag2-motlag9 $30 segme2 $61 segme3 $92 segme10 $1024; %put %str(length motlag motlag2-motlag9 $30 segme2 $61 segme3 $92 segme10 $1024;); motlag=lag(mot); %put %str(motlag=lag(mot);); motlag2=lag2(mot); %put %str(motlag2=lag2(mot);); motlag3=lag3(mot); %put %str(motlag3=lag3(mot);); motlag4=lag4(mot); %put %str(motlag4=lag4(mot);); motlag5=lag5(mot); %put %str(motlag5=lag5(mot);); motlag6=lag6(mot); %put %str(motlag6=lag6(mot);); motlag7=lag7(mot); %put %str(motlag7=lag7(mot);); motlag8=lag8(mot); %put %str(motlag8=lag8(mot);); motlag9=lag9(mot); %put %str(motlag9=lag9(mot);); if Max(abs(dif(numindiv)),abs(dif(numphras)),abs(dif(numparag)))=0 then do; %put %str(if Max(abs(dif(numindiv)),abs(dif(numphras)),abs(dif(numparag)))=0 then do;); motindiv+1; %put %str(motindiv+1;); segme2= motlag !! " " !! mot; %put %str(segme2= motlag !! " " !! mot; ); segme2=compbl(segme2); %put %str(segme2=compbl(segme2);); nbindi+0; %put %str(nbindi+0;); end; %put %str(end;); else do; %put %str(else do;); motindiv=1; %put %str(motindiv=1;); nbindi+1; %put %str(nbindi+1;); end; %put %str(end;); if Max(abs(dif(numindiv)),abs(dif(numphras)),abs(dif(numparag)))=0 and Max(abs(dif2(numindiv)),abs(dif2(numphras)),abs(dif2(numparag)))=0 then do; %put %str(if Max(abs(dif(numindiv)),abs(dif(numphras)),abs(dif(numparag)))=0 and Max(abs(dif2(numindiv)),abs(dif2(numphras)),abs(dif2(numparag)))=0 then do;); segme3= motlag2 !! " " !! motlag !! " " !! mot; %put %str(segme3= motlag2 !! " " !! motlag !! " " !! mot; ); segme3=compbl(segme3); %put %str(segme3=compbl(segme3);); end; %put %str(end;); if Max(abs(dif9(numindiv)),abs(dif9(numtext)))=0 then do; %put %str(if Max(abs(dif9(numindiv)),abs(dif9(numtext)))=0 then do;); segme10= motlag9!!" " !!motlag8!!" "!!motlag7!!" " !!motlag6!!" " !!motlag5!!" " !! motlag4!!" " !!motlag3!!" " !!motlag2 !! " " !! motlag !! " " !! mot; %put %str(segme10= motlag9!!" " !!motlag8!!" "!!motlag7!!" " !!motlag6!!" " !!motlag5!!" " !! motlag4!!" " !!motlag3!!" " !!motlag2 !! " " !! motlag !! " " !! mot; ); segme10=compbl(segme10); %put %str(segme10=compbl(segme10);); end; %put %str(end;); if Max(abs(dif(numindiv)),abs(dif(numtext)))=0 then do; %put %str(if Max(abs(dif(numindiv)),abs(dif(numtext)))=0 then do;); ucecnt+1; %put %str(ucecnt+1;); end; %put %str(end;); else ucecnt=1; %put %str(else ucecnt=1;); length numucet $30; %put %str(length numucet $30;); numucet= compbl(max(numtext,Numindiv) !! "-" !! 1+Int((ucecnt-1)/10)); %put %str(numucet= compbl(max(numtext,Numindiv) !! "-" !! 1+Int((ucecnt-1)/10));); if lag(numucet) NE numucet then numuce+1; %put %str(if lag(numucet) NE numucet then numuce+1;); else numuce+0; %put %str(else numuce+0;); *% définition de l’unité de base; %if &indiv=1 and &traitem=1 %then %do; numunite=numindiv*1; %put %str(numunite=numindiv*1;); %end; %if &indiv=1 and &traitem=2 %then %do; numunite=numphras*1; %put %str(numunite=numphras*1;); %end; %if &indiv=2 %then %do; numunite=numuce*1; %put %str(numunite=numuce*1;); %end; %if &indiv=3 %then %do; numunite=numparag*1; %put %str(numunite=numparag*1;); %end; %if &indiv=4 %then %do; numunite=numtext*1; %put %str(numunite=numtext*1;); %end; drop motlag motlag2-motlag9 ucecnt; %put %str(drop motlag motlag2-motlag9 ucecnt;); %put %str(run;); run; %if &motoutil=OUI %then %do; data motoutil; set &basoutil; %put %str(data motoutil; set &basoutil;); %if &Accents=OUI %then %do; mot=translate(mot,"eeeeaaauuuiiooycEEEEAAAUUUIIOOC", "éèêëàâäùûüîïôöÿçÉÈÊËÀÂÄÙÜÛÎÏÔÖÇ"); %put %str(mot=translate(mot,"eeeeaaauuuiiooycEEEEAAAUUUIIOOC", "éèêëàâäùûüîïôöÿçÉÈÊËÀÂÄÙÜÛÎÏÔÖÇ");); %put %str(*Suppression des accents;); %end; %if &Majuscul=OUI %then %do; mot=Upcase(mot); %put %str(mot=Upcase(mot);); %put %str(*Confustion Majuscule minuscule;); %end; %put %str(run;); run; proc sort data=&dat1; by mot; %put %str( proc sort data=&dat1; by mot; ); %put %str(run;); run; proc sort data=MOTOUTIL; by mot; %put %str( proc sort data=MOTOUTIL; by mot; ); %put %str(run;); run; data MOTOUTIL; set motoutil; by mot; %put %str( data MOTOUTIL; set motoutil; by mot;); %put %str( if last.mot;); if last.mot; %put %str(run;); run; data &dat1; merge &dat1 motoutil; %put %str(data &dat1; merge &dat1 motoutil;); by mot; %put %str(by mot;); if nummot <>.; %put %str(if nummot <>.;); if nature="" then motoutil="NON"; else motoutil="OUI"; %put %str(if nature="" then motoutil="NON"; else motoutil="OUI";); %put %str(run;); run; proc sort data=&dat1; by nummot; %put %str( proc sort data=&dat1; by nummot; ); %put %str(run;); run; %end; data &dat2; run; %put %str(data &dat2; run;); proc sql; %put %str(proc sql;); CREATE TABLE &dat2 AS SELECT count(mot) AS nbmot, * FROM &dat1 GROUP BY mot; %put %str(CREATE TABLE &dat2 AS SELECT count(mot) AS nbmot, * FROM &dat1 GROUP BY mot;); CREATE TABLE &dat3 AS SELECT count(segme2) AS nbsegme2, * FROM &dat2 GROUP BY segme2; %put %str(CREATE TABLE &dat2 AS SELECT count(segme2) AS nbsegme2, * FROM &dat1 GROUP BY segme2;); CREATE TABLE &dat4 AS SELECT count(segme3) AS nbsegme3, * FROM &dat3 GROUP BY segme3; %put %str(CREATE TABLE &dat3 AS SELECT count(segme3) AS nbsegme3, * FROM &dat1 GROUP BY segme3;); %put %str(quit;); quit; proc datasets; %put %str(proc datasets;); %put %str(delete &dat1 &dat2 &dat3;); delete &dat1 &dat2 &dat3; change &dat4=&dat1; %put %str(change &dat4=&dat1;); %put %str(run;); run; proc sort data=&dat1; by nummot; %put %str( proc sort data=&dat1; by nummot; ); %put %str(run;); run; data &dat2; run; %put %str(data &dat2; run;); proc freq data=&dat1 order=freq; %put %str(proc freq data=&dat1 order=freq;); tables mot / noprint out=&dat2; %put %str(tables mot / noprint out=&dat2;); %put %str(run;); run; %if &motoutil=OUI %then %do; proc sort data=&dat2; by mot; run; %put %str( proc sort data=&dat2; by mot; run;); data &dat2; merge &dat2 motoutil; %put %str(data &dat2; merge &dat2 motoutil;); by mot; %put %str(by mot;); if count <>.; %put %str(if count <>.;); if nature="" then motoutil="NON"; else motoutil="OUI"; %put %str(if nature="" then motoutil="NON"; else motoutil="OUI";); %put %str(run;); run; proc sort data=&dat2; by motoutil descending COUNT ; %put %str( proc sort data=&dat2; by motoutil descending COUNT ; ); %put %str(run;); run; %end; data &dat3; run; %put %str(data &dat3; run;); proc freq data=&dat1 ; %put %str(proc freq data=&dat1 ;); tables longueur / noprint out=&dat3; %put %str(tables longueur / noprint out=&dat3;); %put %str(run;); run; data &dat2; set &dat2; %put %str(data &dat2; set &dat2;); rename Count=freqform; %put %str(rename Count=freqform;); longueur=length(mot); %put %str(longueur=length(mot);); %put %str(run;); run; data &dat4; run; %put %str(data &dat4; run;); proc freq data=&dat2 ; %put %str(proc freq data=&dat2 ;); tables longueur / noprint out=&dat4; %put %str(tables longueur / noprint out=&dat4;); %put %str(run;); run; data &dat5; run; %put %str(tables longueur / noprint out=&dat4;); data &dat5; merge &dat3 (rename=(count=Nbmots percent=PcNbmots)) &dat4 (rename=(count=NbFG percent=PcNbFG)); %put %str(data &dat5; merge &dat3 (rename=(count=Nbmots percent=PcNbmots)) &dat4 (rename=(count=NbFG percent=PcNbFG));); by longueur; %put %str(by longueur;); PCNBMOTS=PCNBMOTS/100; %put %str(PCNBMOTS=PCNBMOTS/100;); PCNBFG=PCNBFG/100; %put %str(PCNBFG=PCNBFG/100;); DELIMI='‚'; %put %str(DELIMI='‚';); label DELIMI="‚"; %put %str(label DELIMI="‚";); label longueur="Longueur du mot (en caractères)"; %put %str(label longueur="Longueur du mot (en caractères)";); label NBFG="Nombre de Formes Graphiques par longueur"; %put %str(label NBFG="Nombre de Formes Graphiques par longueur";); label PCNBFG="Répartition des FG par longueur"; %put %str(label PCNBFG="Répartition des FG par longueur";); label Nbmots="Nombre de mots par longueur"; %put %str(label Nbmots="Nombre de mots par longueur"; ); label PCNBMOTS="Répartition des mots par longueur"; %put %str(label PCNBMOTS="Répartition des mots par longueur";); %put %str(run;); run; data &dat4; run; %put %str(data &dat4; run;); proc freq data=&dat2; %put %str(proc freq data=&dat2;); tables freqform/out=&dat4 Noprint; %put %str(tables freqform/out=&dat3 Noprint;); %put %str(run;); run; data &dat4; set &dat4 (rename= (count=MOTPARFG)); %put %str(data &dat4; set &dat4 (rename= (count=MOTPARFG));); DELIMI='‚'; %put %str(DELIMI='‚';); label DELIMI="‚"; %put %str(label DELIMI="‚";); totmot=freqform*motparfg; %put %str(totmot=freqform*motparfg;); totFg+motparfg; %put %str(totFg+motparfg;); Cumtotmo+totmot; %put %str(Cumtotmo+totmot;); Percent=PERCENT/100; %put %str(Percent=PERCENT/100;); label Freqform="Fréquence de formes graphiques"; %put %str(label Freqform="Fréquence de formes graphiques ";); label MOTPARFG="Nombre de FG par fréquence "; %put %str(label MOTPARFG="Nombre de FG par fréquence";); label TOTMOT="Nombre de mots par fréquence "; %put %str(label TOTMOT="Nombre de mots par fréquence";); label PERCENT="Répartition des FG par fréquence"; %put %str(label PERCENT="Répartition des FG par fréquence";); %put %str(end;); %put %str(run;); run; %let z=%sysfunc(open(&dat4)); %let rc=%sysfunc(fetchobs(&z,1)); %let hapax=%sysfunc(getvarn(&z,%sysfunc(varnum(&z,motparfg)))); %let last=%sysfunc(attrn(&z,nobs)); %let rc=%sysfunc(fetchobs(&z,&last)); %let nbfg=%sysfunc(getvarn(&z,%sysfunc(varnum(&z,totfg)))); %let nbmot=%sysfunc(getvarn(&z,%sysfunc(varnum(&z,cumtotmo)))); %let txdiv=%substr(%sysevalf(100*&nbfg/&nbmot),1,5); %let pourc=%nrstr(% ); %let txdiv=&txdiv&pourc; %let txhapax=%substr(%sysevalf(100*&hapax/&nbfg),1,5); %let txhapax=&txhapax&pourc; %let txhapa2=%substr(%sysevalf(100*&hapax/&nbmot),1,5); %let txhapa2=&txhapa2&pourc; %let zz=%sysfunc(close(&z)); %let z=%sysfunc(open(&dat1)); %let last=%sysfunc(attrn(&z,nobs)); %let rc=%sysfunc(fetchobs(&z,&last)); %let nbunite=%sysfunc(getvarn(&z,%sysfunc(varnum(&z,NUMUNITE)))); %let nbindiv=%sysfunc(getvarn(&z,%sysfunc(varnum(&z,NUMINDIV)))); %let nbuce=%sysfunc(getvarn(&z,%sysfunc(varnum(&z,NUMUCE)))); %let nbphras=%sysfunc(getvarn(&z,%sysfunc(varnum(&z,NUMPHRAS)))); %let NBPARAG=%sysfunc(getvarn(&z,%sysfunc(varnum(&z,NUMPARAG)))); %let NBTEXT=%sysfunc(getvarn(&z,%sysfunc(varnum(&z,NUMTEXT)))); %let zz=%sysfunc(close(&z)); %if &traitem=2 %then %do; %if &indivafc=1 %then %let lignes=NUMTEXT; %if &indivafc=2 %then %let lignes=NUMPHRAS; %if &indivafc=3 %then %let lignes=NUMPARAG; %if &indivafc=4 %then %let lignes=NUMUCE; %end; %if &traitem=1 %then %do; %if &indivafc=1 %then %let lignes=&keep; %if &indivafc=2 %then %let lignes=NUMINDIV; %end; title; DATA _NULL_; file print; put "„ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ†"; put "‚ Petit Résumé de l´Analyse" @60 "‚"; put "‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ‰"; put "‚ Nombre d´unités analysées : &nbunite" @60 "‚"; %if &traitem=1 %then %do; put "‚ Nombre d´individus : &nbindiv" @60 "‚"; put "‚ Nombre d´UCE de 10 mots : &nbuce" @60 "‚"; %end; %if &traitem=2 %then %do; put "‚ Nombre de phrases : &nbphras" @60 "‚"; put "‚ Nombre d´UCE de 10 mots : &nbuce" @60 "‚"; put "‚ Nombre de paragraphes : &nbparag" @60 "‚"; %if &nouvtext NE %then %do; put "‚ Nombre de textes : &nbtext" @60 "‚"; %end; %end; put "‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ‰"; put "‚ Nombre de mots : &nbmot" @60 "‚"; put "‚ Nombre de formes graphiques : &nbfg" @60 "‚"; put "‚ Nombre d´hapax : &hapax" @60 "‚"; put "‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ‰"; put "‚ Taux d´hapax parmi les FG : &txhapax" @60 "‚"; put "‚ Taux d´hapax parmi les mots : &txhapa2" @60 "‚"; put "‚ Taux de diversité du vocabulaire : &txdiv" @60 "‚"; put "ŠƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒŒ"; put ; put ; put "„ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ†"; put "‚ Bases SAS générées par Anatext" @60 "‚"; put "‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ‰"; put "‚ - Base avec tous les mots dans l´ordre de leur" @60 "‚"; put "‚ apparition: &dat1" @60 "‚"; put "‚" @60 "‚"; put "‚ - Base avec les fréquences des mots : &dat2" @60 "‚"; put "‚" @60 "‚"; put "‚ - Base avec les fréquences des segments de deux mots :" @60 "‚"; put "‚&dat3" @60 "‚"; put "‚" @60 "‚"; put "‚ - Base avec les fréquences des segments de trois mots :" @60 "‚"; put "‚&dat4" @60 "‚"; %if &afc>0 %then %do; put "‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ‰"; put "‚L´analyse factorielle de correspondances (AFC) a été " @60 "‚"; put "‚menée sur le tableau [&lignes ] * mots :" @60 "‚"; put "‚" @60 "‚"; put "‚La table de résultats de l'analyse factorielle s´intitule :" @60 "‚";; put "‚&dat6" @60 "‚";; %end; %end; put "ŠƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒŒ"; %if &mat>0 %then %do; put "‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ‰"; put "‚ - La base prête pour l'ACM s´intitule :" @60 "‚"; put "‚&dat5" @60 "‚"; put "‚" @60 "‚"; put "‚Elle contient les variables suivantes : " @60 "‚"; put "‚- FG1-FGn variables de fréquence des mots sélectionnés" @60 "‚"; put "‚- FGDI1-FGDIn variables de présence-absence des mots" @60 "‚"; put "‚sélectionnés. Et FGDN1-FGDNn leurs complémentaires." @60 "‚"; %if &acm>0 %then %do; put "‡ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ‰"; put "‚L´analyse de correspondances multiples (ACM) a été " @60 "‚"; put "‚menée sur les variables :" @60 "‚"; %if &acm=1 %then %do; put "‚ FGDI1-FGDIn FGDN1-FGDNn" @60 "‚";; %end; put "‚" @60 "‚"; put "‚La table de résultats de l'ACM s´intitule :" @60 "‚";; put "‚&dat8" @60 "‚";; %end; %end; put "ŠƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒŒ"; put ; run; proc print data=&dat5 LABEL; %put %str(proc print data=&dat5 LABEL;); ID Longueur; %put %str(ID Longueur;); VAR DELIMI NbFG Pcnbfg Nbmots PCnbmots ; %put %str(VAR DELIMI NbFG Pcnbfg Nbmots PCnbmots ;); format PCnbmots Pcnbfg PERCENT8.2; %put %str(format PCnbmots Pcnbfg PERCENT8.2;); SUM NbFG Pcnbfg Nbmots PCnbmots ; %put %str(SUM NbFG Pcnbfg Nbmots PCnbmots ;); title 'Nombre de formes graphiques et nombres de mots en'; %put %str(title 'Nombre de formes graphiques et nombres de mots en'; ); title2 ' fonction de la longueur des mots'; %put %str(title2 ' fonction de la longueur des mots';); %put %str(run;); run; Proc print data=&dat4 LABEL; %put %str(Proc print data=&dat4 LABEL;); VAR DELIMI motparfg percent totmot ; %put %str(VAR DELIMI motparfg percent totmot ;); id freqform; %put %str(id freqform;); SUM motparfg percent totmot ; %put %str(SUM motparfg percent totmot ;); format PERCENT PERCENT8.2; %put %str(format PERCENT PERCENT8.2;); title 'Nombre de formes graphiques et nombres de mots en '; %put %str(title 'Nombre de formes graphiques et nombres de mots en ';); title2 ' fonction de la fréquence des formes graphiques'; %put %str(title2 ' fonction de la fréquence des formes graphiques';); %put %str(run;); run; data &dat2; set &dat2; %put %str(data &dat2; set &dat2;); DELIMI='‚'; %put %str(DELIMI='‚';); label DELIMI="‚"; %put %str(label DELIMI="‚";); PERCENT=PERCENT/100; %put %str(PERCENT=PERCENT/100;); %put %str(run;); run; %let titre1=Liste des formes graphiques de fréquence>&minfreq; %let titre2= et de longueur>&minlong; proc print data=&dat2 LABEL N; %put %str(proc print data=&dat2 LABEL N;); id mot; %put %str(id mot;); VAR DELIMI FREQFORM PERCENT LONGUEUR; %put %str(VAR DELIMI FREQFORM PERCENT LONGUEUR;); SUM FREQFORM PERCENT; %put %str(SUM FREQFORM PERCENT;); format PERCENT PERCENT8.2; %put %str(format PERCENT PERCENT8.2;); %if &motoutil=OUI %then %do; by motoutil; %put %str(by motoutil;); %end; where length(mot)>&minlong and freqform>&minfreq; %put %str(where length(mot)>&minlong and freqform>&minfreq;); title &titre1; %put %str(title &titre1;); title2 &titre2; %put %str(title2 &titre2;); %put %str(run;); run; data &dat3; run; %put %str(data &dat3; run;); proc freq data=&dat1 order=freq; %put %str(proc freq data=&dat1 order=freq;); tables segme2 / noprint out=&dat3; %put %str(tables segme2 / noprint out=&dat3;); %put %str(run;); run; data &dat3; set &dat3; %put %str(data &dat3; set &dat3;); DELIMI='‚'; %put %str(DELIMI='‚';); label DELIMI="‚"; %put %str(label DELIMI="‚";); PERCENT=PERCENT/100; %put %str(PERCENT=PERCENT/100;); %put %str(run;); run; %let titre1=Liste des segments de 2 mots de fréquence>&minfreq; proc print data=&dat3 LABEL N; %put %str(proc print data=&dat3 LABEL N;); VAR DELIMI COUNT PERCENT; %put %str(VAR DELIMI COUNT PERCENT;); SUM COUNT PERCENT; %put %str(SUM COUNT PERCENT;); format PERCENT PERCENT8.2; %put %str(format PERCENT PERCENT8.2;); id SEGME2; %put %str(id SEGME2;); where count>&minfreq and length(segme2)>1; %put %str(where count>&minfreq and length(segme2)>1;); title &titre1; %put %str(title &titre1;); %put %str(run;); run; data &dat4; run; %put %str(data &dat4; run;); proc freq data=&dat1 order=freq; %put %str(proc freq data=&dat1 order=freq;); tables segme3 / noprint out=&dat4; %put %str(tables segme3 / noprint out=&dat4;); %put %str(run;); run; data &dat4; set &dat4; %put %str(data &dat4; set &dat4;); DELIMI='‚'; %put %str(DELIMI='‚';); label DELIMI="‚"; %put %str(label DELIMI="‚";); PERCENT=PERCENT/100; %put %str(PERCENT=PERCENT/100;); %put %str(run;); run; %let titre1=Liste des segments de 3 mots de fréquence>&minfreq; proc print data=&dat4 LABEL N; %put %str(proc print data=&dat4 LABEL N;); VAR DELIMI COUNT PERCENT; %put %str(VAR DELIMI COUNT PERCENT;); SUM COUNT PERCENT; %put %str(SUM COUNT PERCENT;); format PERCENT PERCENT8.2; %put %str(format PERCENT PERCENT8.2;); id segme3; %put %str(id segme3;); where count>&minfreq and length(segme3)>1; %put %str(where count>&minfreq and length(segme3)>1;); title &titre1; %put %str(title &titre1;); %put %str(run;); run; title; title2; %put %str(title;title2;); %if &afc=1 %then %do; proc corresp data=&dat1 out=&dat6 dim=4; %put %str(proc corresp data=&dat1 out=&dat6 dim=4;); tables &lignes , mot; %put %str(tables &lignes,mot;); %if &motoutil=OUI %then %do; where nbmot>&minfreq and longueur>&minlong and motoutil="NON"; %put %str(where nbmot>&minfreq and longeur>&minlong and motoutil="NON";); %end; %else %do; where nbmot>&minfreq and longueur>&minlong; %put %str(where nbmot>&minfreq and longeur>&minlong;); %end; %put %str(run;); run; options ps=120 ls=160; %put %str(options ps=120 ls=160;); PROC PLOT1 DATA=&dat6 (WHERE=(_TYPE_="VAR")); %put %str(PROC PLOT1 DATA=&dat6 (WHERE=(_TYPE_="VAR" ));); PLOT DIM2*DIM1$_NAME_/HREF=0 VREF=0 BOX LIST=5; %put %str(PLOT DIM2*DIM1$_NAME_/HREF=0 VREF=0 BOX LIST=5;); LABEL DIM2= axe 2; %put %str(LABEL DIM2= axe 2;); LABEL DIM1= axe 1; %put %str(LABEL DIM1= axe 1;); %put %str(run;); run; options ps=120 ls=160; %put %str(options ps=120 ls=160;); PROC PLOT1 DATA=&dat6 (WHERE=(_TYPE_="OBS")); %put %str(PROC PLOT1 DATA=&dat6 (WHERE=(_TYPE_="VAR" ));); PLOT DIM2*DIM1$_NAME_/HREF=0 VREF=0 BOX LIST=5; %put %str(PLOT DIM2*DIM1$_NAME_/HREF=0 VREF=0 BOX LIST=5;); LABEL DIM2= axe 2; %put %str(LABEL DIM2= axe 2;); LABEL DIM1= axe 1; %put %str(LABEL DIM1= axe 1;); %put %str(run;); run; data &dat7; run; %put %str(data &dat7; run;); data &dat7; set &dat6; %put %str(data &dat7; set &dat6; ); where _type_="VAR" and index(_NAME_,"FGDN")=0 and index(_NAME_,"S2DN")=0 and index(_NAME_,"S3DN")=0; %put %str(where _type_="VAR" and index(_NAME_,"FGDN")=0 and index(_NAME_,"S2DN")=0 and index(_NAME_,"S3DN")=0;); xsys="2"; %put %str(xsys="2"; ); ysys="2"; %put %str(ysys="2"; ); x=dim1; %put %str(x=dim1;); y=dim2; %put %str(y=dim2;); size=0.7; %put %str(size=0.7; ); text=_NAME_; %put %str(text=_NAME_; ); position="A"; %put %str(position="A"; ); color="BLACK"; %put %str(color="BLACK"; ); %put %str(run; ); run; proc gplot data=&dat7 anno=&dat7; %put %str(proc gplot data=&dat7 anno=&dat7; ); bubble dim2*dim1=mass/ href=0 vref=0 Bsize=10; %put %str(bubble dim2*dim1=mass/ href=0 vref=0 Bsize=10; ); LABEL DIM2= axe 2; %put %str(LABEL DIM2= axe 2;); LABEL DIM1= axe 1; %put %str(LABEL DIM1= axe 1;); title h=1 "Les variables dans le premier plan"; %put %str(title h=1 "Les variables dans le premier plan";); %put %str(run; ); run; data &dat7; set &dat6; %put %str(data &dat7; set &dat6; ); where _type_="OBS"; %put %str(where _type_="OBS";); xsys="2"; %put %str(xsys="2"; ); ysys="2"; %put %str(ysys="2"; ); x=dim1; %put %str(x=dim1;); y=dim2; %put %str(y=dim2;); size=0.7; %put %str(size=0.7; ); text=_NAME_; %put %str(text=_NAME_;); position="A"; %put %str(position="A"; ); color="BLACK"; %put %str(color="BLACK"; ); %put %str(run;); run; proc gplot data=&dat7; %put %str(proc gplot data=&dat7; ); plot dim2*dim1/ href=0 vref=0; %put %str(plot dim2*dim1/ href=0 vref=0; ); SYMBOL h=0.5; %put %str(SYMBOL h=0.5;); LABEL DIM2= axe 2; %put %str(LABEL DIM2= axe 2;); LABEL DIM1= axe 1; %put %str(LABEL DIM1= axe 1;); title h=1 "Les observations dans le premier plan" ; %put %str(title h=1 "Les observations dans le premier plan";); %put %str(run; ); run; %end; %if &mat<1 %then %goto fin; %let nmotouti=""; %* %end if; data &dat5; run; %put %str(data &dat5; run;); data &dat5; set &dat2; %put %str(data &dat5; set &dat2;); %if &motoutil=OUI %then %do; where length(mot)>&minlong and freqform>&minfreq and MOTOUTIL="NON"; %put %str(where length(mot)>&minlong and freqform>&minfreq and MOTOUTIL="NON";); %put %str(run;); %end; %else %do; where length(mot)>&minlong and freqform>&minfreq; %put %str(where length(mot)>&minlong and freqform>&minfreq;); %put %str(run;); %end; run; data &dat1; set &dat1; %put %str(data &dat1; set &dat1;); %Let compte=1; %let nomvar=FGD&compte; %let nomvar2=FG&compte; %let nomvar3=FGDI&compte; %let nomvar4=FGDN&compte; %let z=%sysfunc(open(&dat5)); %let finfg=%sysfunc(attrn(&z,nobs)); %let zz=%sysfunc(close(&z)); %do %while (&compte<=&finfg); %local z; %local zz; %let z=%sysfunc(open(&dat5(keep=mot))); %let rc=%sysfunc(fetchobs(&z,&compte)); %let motvar=%sysfunc(getvarc(&z,%sysfunc(varnum(&z,MOT)))); %let zz=%sysfunc(close(&z)); &nomvar=(mot="&motvar"); %put %str(&nomvar=(mot="&motvar");); label &nomvar="&motvar"; %put %str(label &nomvar="&motvar";); if numunite=lag(numunite) then do; %put %str(if numunite=lag(numunite) then do;); &nomvar2+&nomvar; %put %str(&nomvar2+&nomvar;); end; %put %str(end;); else do; %put %str(else do;); &nomvar2=0; %put %str(&nomvar2=0;); end; %put %str(end;); &nomvar3=min(&nomvar2,1); %put %str(&nomvar3=min(&nomvar2,1);); &nomvar4=1-&nomvar3; %put %str(&nomvar4=1-&nomvar3;); label &nomvar2="&motvar"; %put %str(label &nomvar2="&motvar";); label &nomvar3="&motvar"; %put %str(label &nomvar3="&motvar";); %let compte=%eval(&compte+1); %let nomvar=FGD&compte; %let nomvar2=FG&compte; %let nomvar3=FGDI&compte; %let nomvar4=FGDN&compte; %end; %put %str(run;); %let FGfi=FG&finfg; %let FGDIfi=FGDI&finfg; %let FGDNfi=FGDN&finfg; FG0=MOTINDIV-sum( of FG1--&FGfi); %put %str(FG0=MOTINDIV-sum(of FG1--&FGfi);); label FG0="AutrMots"; %put %str(label FG0="AutrMots";); %if &mat<2 %then %goto fac; %Let compte=1; %let nomvar=S2D&compte; %let nomvar2=S2C&compte; %let nomvar3=S2DI&compte; %let nomvar4=S2DN&compte; %let z=%sysfunc(open(&dat3)); %let fin=%sysfunc(attrn(&z,nobs)); %let zz=%sysfunc(close(&z)); %let freq=%eval(&minfreq+1); %do %while (&freq>&minfreq); %local z; %local zz; %let z=%sysfunc(open(&dat3(keep=segme2 count))); %let rc=%sysfunc(fetchobs(&z,&compte)); %let motvar=%sysfunc(getvarc(&z,%sysfunc(varnum(&z,segme2)))); %let freq=%sysfunc(getvarn(&z,%sysfunc(varnum(&z,count)))); %let zz=%sysfunc(close(&z)); &nomvar=(Segme2="&motvar"); %put %str(&nomvar=(segme2="&motvar");); label &nomvar="&motvar"; %put %str(label &nomvar="&motvar";); if numunite=lag(numunite) then do; %put %str(if numunite=lag(numunite) then do;); &nomvar2+&nomvar; %put %str(&nomvar2+&nomvar;); end; %put %str(end;); else do; %put %str(else do;); &nomvar2=0; %put %str(&nomvar2=0;); end; %put %str(end;); &nomvar3=min(&nomvar2,1); %put %str(&nomvar3=min(&nomvar2,1);); &nomvar4=1-&nomvar3; %put %str(&nomvar4=1-&nomvar3;); label &nomvar2="&motvar"; %put %str(label &nomvar2="&motvar";); label &nomvar3="&motvar"; %put %str(label &nomvar3="&motvar";); %let compte=%eval(&compte+1); %let nomvar=S2D&compte; %let nomvar2=S2C&compte; %let nomvar3=S2DI&compte; %let nomvar4=S2DN&compte; %end; %let fins2=%eval(&compte-2); %let fins2b=%eval(&compte-1); %Let compte=1; %let nomvar=S3D&compte; %let nomvar2=S3C&compte; %let nomvar3=S3DI&compte; %let nomvar4=S3DN&compte; %let z=%sysfunc(open(&dat4)); %let fin=%sysfunc(attrn(&z,nobs)); %let zz=%sysfunc(close(&z)); %let freq=%eval(&minfreq+1); %do %while (&freq>&minfreq); %local z; %local zz; %let z=%sysfunc(open(&dat4(keep=segme3 count))); %let rc=%sysfunc(fetchobs(&z,&compte)); %let motvar=%sysfunc(getvarc(&z,%sysfunc(varnum(&z,segme3)))); %let freq=%sysfunc(getvarn(&z,%sysfunc(varnum(&z,count)))); %let zz=%sysfunc(close(&z)); &nomvar=(Segme3="&motvar"); %put %str(&nomvar=(segme3="&motvar");); label &nomvar="&motvar"; %put %str(label &nomvar="&motvar";); if numunite=lag(numunite) then do; %put %str(if numunite=lag(numunite) then do;); &nomvar2+&nomvar; %put %str(&nomvar2+&nomvar;); end; %put %str(end;); else do; %put %str(else do;); &nomvar2=0; %put %str(&nomvar2=0;); end; %put %str(end;); &nomvar3=min(&nomvar2,1); %put %str(&nomvar3=min(&nomvar2,1);); &nomvar4=1-&nomvar3; %put %str(&nomvar4=1-&nomvar3;); label &nomvar2="&motvar"; %put %str(label &nomvar2="&motvar";); label &nomvar3="&motvar"; %put %str(label &nomvar3="&motvar";); %let compte=%eval(&compte+1); %let nomvar=S3D&compte; %let nomvar2=S3C&compte; %let nomvar3=S3DI&compte; %let nomvar4=S3DN&compte; %end; %let fins3=%eval(&compte-2); %let fins3b=%eval(&compte-1); %fac: ; run; %let nofi=FGD&finfg; data &dat5; run; %put %str(data &dat5; run;); data &dat5; set &dat1; %put %str(data &dat5; set &dat1;); drop mot segme2 segme3 FGD1-&nofi ; %put %str(drop mot segme2 segme3 FGD1-&nofi ;); %if &mat=2 %then %do; drop S2D1-S2D&fins2 S2C&fins2b S2D&fins2b S2DI&fins2b S2DN&fins2b S3D1-S3D&fins3 S3C&fins3b S3D&fins3b S3DI&fins3b S3DN&fins3b; %put %str(drop S2D1-S2D&fins2 S2C&fins2b S2D&fins2b S2DI&fins2b S2DN&fins2b S3D1-S3D&fins3 S3C&fins3b S3D&fins3b S3DI&fins3b S3DN&fins3b;); %end; by numunite; %put %str(by numunite;); if last.numunite then output; %put %str(if last.numunite then output;); %put %str(run;); run; data &dat1; set &dat1; %put %str(data &dat1; set &dat1;); drop FG1-&fgfi FGDI1-&fgdifi FGDN1-&FGDNFI; %put %str(drop FG1-&fgfi FGDI1-&fgdifi FGDN1-&FGDNFI;); %if &mat=2 %then %do; drop S2C1-S2C&fins2b S2DI1-S2DI&fins2b S2DN1-S2DN&fins2b S3C1-S3C&fins3b S3DI1-S3DI&fins3b S3DN1-S3DN&fins3b ; %put %str(drop S2C1-S2C&fins2b S2DI1-S2DI&fins2b S2DN1-S2DN&fins2b S3C1-S3C&fins3b S3DI1-S3DI&fins3b S3DN1-S3DN&fins3b;); %end; %put %str(run;); run; %if &acm <1 %then %goto fin; title "Analyse de correspondances multiples"; %put %str(title "Analyse de correspondances multiples";); title2 " du tableau individus*(pres/abs mot1,..,pres/abs motn)"; %put %str(title2 " du tableau individus*(pres/abs mot1,..,pres/abs motn)";); title3 " (instruction VAR)"; %put %str(title3 " (instruction VAR)";); data &dat8;run; %put %str(data &dat8;run;); proc corresp data=&dat5 out=&dat8 short dim=4; %put %str(proc corresp data=&dat5 out=&dat8 dim=4 short; ); %if &acm=1 %then %do; var FGDI1-&fgdifi FGDn1-&fgdnfi; %put %str(var FGDI1-&fgdifi FGdn1-&fgdnfi;); %end; %put %str(run;); run; title4 " Axe 1 - Axe 2. Variables."; %put %str(title4 " Axe 1 - Axe 2. Variables";); title5 " NB : Les variables marquant la non-utilisation chacun des mots"; %put %str(title5 " NB : Les variables marquant la non-utilisation chacun des mots";); title6 " (FGDN1-&fgdnfi) n ont pas été représentées sur le graphique"; %put %str( title6 " (FGDN1-&fgdnfi) n ont pas été représentées sur le graphique";); options ps=120 ls=160; %put %str(options ps=120 ls=160;); PROC PLOT1 DATA=&dat8 (WHERE=(_TYPE_="VAR" and (index(_NAME_,"FGDN")=0 and index(_NAME_,"S2DN")=0 and index(_NAME_,"S3DN")=0))); %put %str(PROC PLOT1 DATA=&dat8 (WHERE=(_TYPE_="VAR" and (index(_NAME_,"FGDN")=0 and index(_NAME_,"S2DN")=0 and index(_NAME_,"S3DN")=0)));); PLOT DIM2*DIM1$_NAME_/HREF=0 VREF=0 BOX LIST=5; %put %str(PLOT DIM2*DIM1$_NAME_/HREF=0 VREF=0 BOX LIST=5;); LABEL DIM2= axe 2; %put %str(LABEL DIM2= axe 2;); LABEL DIM1= axe 1; %put %str(LABEL DIM1= axe 1;); %put %str(run;); run; title4 " Axe 1 - Axe 2. Observations."; %put %str(title4 " Axe 1 - Axe 2. Variables";); options ps=120 ls=160; %put %str(options ps=120 ls=160;); PROC PLOT1 DATA=&dat8 (WHERE=(_TYPE_="OBS" )); %put %str(PROC PLOT1 DATA=&dat8 (WHERE=(_TYPE_="OBS" ));); PLOT DIM2*DIM1/HREF=0 VREF=0 BOX LIST=5; %put %str(PLOT DIM2*DIM1/HREF=0 VREF=0 BOX LIST=5;); LABEL DIM2= axe 2; %put %str(LABEL DIM2= axe 2;); LABEL DIM1= axe 1; %put %str(LABEL DIM1= axe 1;); %put %str(run;); run; title4 " Axe 1 - Axe 3. Variables."; %put %str(title4 " Axe 1 - Axe 3. Variables";); title5 " NB : Les variables marquant la non-utilisation chacun des mots"; %put %str(title5 " NB : Les variables marquant la non-utilisation chacun des mots";); title6 " (FGDN1-&fgdnfi) n ont pas été représentées sur le graphique"; %put %str( title6 " (FGDN1-&fgdnfi) n ont pas été représentées sur le graphique";); PROC PLOT1 DATA=&dat8 (WHERE=(_TYPE_="VAR" and (index(_NAME_,"FGDN")=0 and index(_NAME_,"S2DN")=0 and index(_NAME_,"S3DN")=0))); %put %str(PROC PLOT1 DATA=&dat8 (WHERE=(_TYPE_="VAR" and (index(_NAME_,"FGDN")=0 and index(_NAME_,"S2DN")=0 and index(_NAME_,"S3DN")=0)));); PLOT DIM3*DIM1$_NAME_/HREF=0 VREF=0 BOX LIST=5; %put %str(PLOT DIM3*DIM1$_NAME_/HREF=0 VREF=0 BOX LIST=5;); LABEL DIM3= axe 3; %put %str(LABEL DIM3= axe 3;); LABEL DIM1= axe 1; %put %str(LABEL DIM2= axe 1;); %put %str(run;); run; data &dat9; run; %put %str(data &dat9; run;); data &dat9; set &dat8; %put %str(data &dat9; set &dat8; ); where _type_="VAR" and index(_NAME_,"FGDN")=0 and index(_NAME_,"S2DN")=0 and index(_NAME_,"S3DN")=0; %put %str(where _type_="VAR" and index(_NAME_,"FGDN")=0 and index(_NAME_,"S2DN")=0 and index(_NAME_,"S3DN")=0;); xsys="2"; %put %str(xsys="2"; ); ysys="2"; %put %str(ysys="2"; ); x=dim1; %put %str(x=dim1;); y=dim2; %put %str(y=dim2;); size=0.7; %put %str(size=0.7; ); text=_NAME_; %put %str(text=_NAME_; ); position="A"; %put %str(position="A"; ); color="BLACK"; %put %str(color="BLACK"; ); %put %str(run; ); run; proc gplot data=&dat9 anno=&dat9; %put %str(proc gplot data=&dat9 anno=&dat9; ); bubble dim2*dim1=mass/ href=0 vref=0 Bsize=10; %put %str(bubble dim2*dim1=mass/ href=0 vref=0 Bsize=10; ); LABEL DIM2= axe 2; %put %str(LABEL DIM2= axe 2;); LABEL DIM1= axe 1; %put %str(LABEL DIM1= axe 1;); title h=1 "Les variables dans le premier plan"; %put %str(title h=1 "Les variables dans le premier plan";); %put %str(run; ); run; data &dat9; set &dat8; %put %str(data &dat9; set &dat8; ); where _type_="OBS"; %put %str(where _type_="OBS";); xsys="2"; %put %str(xsys="2"; ); ysys="2"; %put %str(ysys="2"; ); x=dim1; %put %str(x=dim1;); y=dim2; %put %str(y=dim2;); size=0.7; %put %str(size=0.7; ); text=_NAME_; %put %str(text=_NAME_;); position="A"; %put %str(position="A"; ); color="BLACK"; %put %str(color="BLACK"; ); %put %str(run;); run; proc gplot data=&dat9; %put %str(proc gplot data=&dat9; ); plot dim2*dim1/ href=0 vref=0; %put %str(plot dim2*dim1/ href=0 vref=0; ); SYMBOL h=0.5; %put %str(SYMBOL h=0.5;); LABEL DIM2= axe 2; %put %str(LABEL DIM2= axe 2;); LABEL DIM1= axe 1; %put %str(LABEL DIM1= axe 1;); title h=1 "Les observations dans le premier plan" ; %put %str(title h=1 "Les observations dans le premier plan";); %put %str(run; ); run; %goto fin; %fin: ; title; %put %str(title;); %put %str(* Les résultats de la liste de mots;); %put %str(* sont dans la table &dat2;); %goto lafin; %rate: ; %put %str(************************************;); %put %str(* De toute apparence, c´est raté ! *;); %put %str(* Vérifier les paramètres entrés ! *;); %put %str(************************************;); %lafin : ; %put %str(**** Le programme était : *********;); %if &traitem=1 %then %do; %put %nrstr(%Anatext); %put %str((where=&where, keep=&keep, var=&var,traitem=&traitem,data=&data,recol=&recol,minlong=&minlong,minfreq=&minfreq,Majuscul=&majuscul, Accents=&accents,Ecran=&ecran,afc=&afc,indivafc=&indivafc,mat=&mat,acm=&acm,indiv=&indiv,motoutil=&motoutil,basoutil=&basoutil);); %end; %if &traitem=2 %then %do; %put %nrstr(%Anatext); %put %str((fichier=&fichier,traitem=&traitem,minlong=&minlong,minfreq=&minfreq,Majuscul=&majuscul,Accents=&accents,Ecran=&ecran,motpara=&motpara, nouvtext=&nouvtext,afc=&afc,indivafc=&indivafc,mat=&mat,acm=&acm,indiv=&indiv,motoutil=&motoutil,basoutil=&basoutil);); %end; %put %str(***********************************;); %put %str(); %put %str(); %put %str(****************************************************************;); %put %str(* C´est fini. Des blocs de programme SAS générés par la macro*;); %put %str(* et directement utilisables comme programme SAS se trouvent *;); %put %str(* au-dessus dans la fenêtre Log. *;); %put %str(****************************************************************;); %MEND;