Bonjour,
Je dispose d'un datasets qui contient 10 colonnes indicées Champ1, Champ2,..., Champ10
je souhaite créé 9 autres colonnes Condi1,...,Condi9 de sorte que:
Condi1 = Champ1 !! " and " !! Champ2
Condi2 = Champ1 !! " and " !! Champ2 !! " and " !! Champ3
...
Condi9 = Champ1 !! " and " ... !! " and " !! Champ10
J'ai esayé le code ci-dessous,
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 data Mabase ; set Mabase ; array Condi(9) $200. ; array Cham(10) Champ1-Champ(10) ; do i=1 to dim(Cham)-1 ; Condi(i) = Cham(1) do k=2 to (i+1); !! " and " !! Cham(k) end; ; end; run;
J'ai l'erreur suivante:
Expecting a ;. au niveau du do k=2 .
Merci par avance de votre aide.
Kedmard
Partager