Précédent   Forum des professionnels en informatique > Logiciels > Solutions d'entreprise > Business Intelligence > SAS > Débutez
Débutez Forum concentrant les premières questions que l'on se pose en tant que débutant
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 10/06/2011, 13h45   #1
Membre à l'essai
 
Inscription : novembre 2009
Messages : 107
Détails du profil
Informations forums :
Inscription : novembre 2009
Messages : 107
Points : 20
Points : 20
Par défaut probleme entre numeric et alphanumeric

voila mon code est tres simple
Code :
1
2
3
4
DATA Popu3;
SET mylib.SOUCHE ( keep= heart D0 F_AGE_DV SUB_ID F_SK_CL);
IF (F_AGE_DV>=68.6 AND F_AGE_DV<=94.6) AND (D0>=5 AND D0<=7.072) AND ((F_SK_CL="Type III") OR (F_SK_CL="Type IV")) then popu3=1;
run;
et voici la log

Code :
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
NOTE: Character VALUES have been converted TO numeric VALUES at the places given BY:
      (Line):(COLUMN).
      593:80    593:104
NOTE: Invalid numeric DATA, 'Type III' , at line 593 COLUMN 80.
NOTE: Invalid numeric DATA, 'Type IV' , at line 593 COLUMN 104.
SUB_ID=001-00003 D0=7.0710678119 F_AGE_DV=74.2 F_SK_CL=Type V heart=N popu3=. _ERROR_=1 _N_=24
NOTE: Invalid numeric DATA, 'Type III' , at line 593 COLUMN 80.
NOTE: Invalid numeric DATA, 'Type IV' , at line 593 COLUMN 104.
SUB_ID=001-00010 D0=7.0710678119 F_AGE_DV=75.5 F_SK_CL=Type IV heart=Y popu3=. _ERROR_=1 _N_=102
NOTE: Invalid numeric DATA, 'Type III' , at line 593 COLUMN 80.
NOTE: Invalid numeric DATA, 'Type IV' , at line 593 COLUMN 104.
SUB_ID=001-00012 D0=7.0710678119 F_AGE_DV=76.3 F_SK_CL=Type IV heart=Y popu3=. _ERROR_=1 _N_=126
NOTE: Invalid numeric DATA, 'Type III' , at line 593 COLUMN 80.
NOTE: Invalid numeric DATA, 'Type IV' , at line 593 COLUMN 104.
SUB_ID=001-00012 D0=7.0710678119 F_AGE_DV=76.3 F_SK_CL=Type IV heart=Y popu3=. _ERROR_=1 _N_=129
NOTE: Invalid numeric DATA, 'Type III' , at line 593 COLUMN 80.
NOTE: Invalid numeric DATA, 'Type IV' , at line 593 COLUMN 104.
SUB_ID=001-00028 D0=7.0710678119 F_AGE_DV=73.0 F_SK_CL=Type V heart=Y popu3=. _ERROR_=1 _N_=299
NOTE: Invalid numeric DATA, 'Type III' , at line 593 COLUMN 80.
NOTE: Invalid numeric DATA, 'Type IV' , at line 593 COLUMN 104.
SUB_ID=001-00028 D0=7.0710678119 F_AGE_DV=73.0 F_SK_CL=Type V heart=Y popu3=. _ERROR_=1 _N_=300
NOTE: Invalid numeric DATA, 'Type III' , at line 593 COLUMN 80.
NOTE: Invalid numeric DATA, 'Type IV' , at line 593 COLUMN 104.
SUB_ID=001-00029 D0=7.0710678119 F_AGE_DV=76.1 F_SK_CL=Type V heart=Y popu3=. _ERROR_=1 _N_=310
NOTE: Invalid numeric DATA, 'Type III' , at line 593 COLUMN 80.
NOTE: Invalid numeric DATA, 'Type IV' , at line 593 COLUMN 104.
SUB_ID=001-00032 D0=7.0710678119 F_AGE_DV=81.1 F_SK_CL=Type V heart=Y popu3=. _ERROR_=1 _N_=343
NOTE: Invalid numeric DATA, 'Type III' , at line 593 COLUMN 80.
NOTE: Invalid numeric DATA, 'Type IV' , at line 593 COLUMN 104.
SUB_ID=001-00048 D0=7.0710678119 F_AGE_DV=77.6 F_SK_CL=Type II heart=N popu3=. _ERROR_=1 _N_=518
NOTE: Invalid numeric DATA, 'Type III' , at line 593 COLUMN 80.
NOTE: Invalid numeric DATA, 'Type IV' , at line 593 COLUMN 104.
SUB_ID=001-00048 D0=7.0710678119 F_AGE_DV=77.6 F_SK_CL=Type II heart=N popu3=. _ERROR_=1 _N_=519
NOTE: Invalid numeric DATA, 'Type III' , at line 593 COLUMN 80.
NOTE: Invalid numeric DATA, 'Type IV' , at line 593 COLUMN 104.
SUB_ID=001-00048 D0=7.0710678119 F_AGE_DV=77.6 F_SK_CL=Type II heart=N popu3=. _ERROR_=1 _N_=520
NOTE: Invalid numeric DATA, 'Type III' , at line 593 COLUMN 80.
NOTE: Invalid numeric DATA, 'Type IV' , at line 593 COLUMN 104.
SUB_ID=001-00048 D0=7.0710678119 F_AGE_DV=77.6 F_SK_CL=Type II heart=N popu3=. _ERROR_=1 _N_=522
NOTE: Invalid numeric DATA, 'Type III' , at line 593 COLUMN 80.
NOTE: Invalid numeric DATA, 'Type IV' , at line 593 COLUMN 104.
SUB_ID=001-00048 D0=7.0710678119 F_AGE_DV=77.6 F_SK_CL=Type II heart=N popu3=. _ERROR_=1 _N_=523
NOTE: Invalid numeric DATA, 'Type III' , at line 593 COLUMN 80.
NOTE: Invalid numeric DATA, 'Type IV' , at line 593 COLUMN 104.
SUB_ID=001-00052 D0=7.0710678119 F_AGE_DV=70.4 F_SK_CL=Type II heart=N popu3=. _ERROR_=1 _N_=562
NOTE: Invalid numeric DATA, 'Type III' , at line 593 COLUMN 80.
NOTE: Invalid numeric DATA, 'Type IV' , at line 593 COLUMN 104.
SUB_ID=001-00053 D0=7.0710678119 F_AGE_DV=79.2 F_SK_CL=Type III heart=Y popu3=. _ERROR_=1
_N_=573
NOTE: Invalid numeric DATA, 'Type III' , at line 593 COLUMN 80.
NOTE: Invalid numeric DATA, 'Type IV' , at line 593 COLUMN 104.
SUB_ID=001-00056 D0=7.0710678119 F_AGE_DV=74.1 F_SK_CL=Type II heart=N popu3=. _ERROR_=1 _N_=607
NOTE: Invalid numeric DATA, 'Type III' , at line 593 COLUMN 80.
NOTE: Invalid numeric DATA, 'Type IV' , at line 593 COLUMN 104.
SUB_ID=001-00060 D0=7.0710678119 F_AGE_DV=72.7 F_SK_CL=Type II heart=Y popu3=. _ERROR_=1 _N_=651
NOTE: Invalid numeric DATA, 'Type III' , at line 593 COLUMN 80.
NOTE: Invalid numeric DATA, 'Type IV' , at line 593 COLUMN 104.
SUB_ID=001-00062 D0=7.0710678119 F_AGE_DV=84.4 F_SK_CL=Type II heart=N popu3=. _ERROR_=1 _N_=673
NOTE: Invalid numeric DATA, 'Type III' , at line 593 COLUMN 80.
NOTE: Invalid numeric DATA, 'Type IV' , at line 593 COLUMN 104.
SUB_ID=001-00064 D0=7.0710678119 F_AGE_DV=75.1 F_SK_CL=Type VI heart=N popu3=. _ERROR_=1 _N_=696
NOTE: Invalid numeric DATA, 'Type III' , at line 593 COLUMN 80.
NOTE: Invalid numeric DATA, 'Type IV' , at line 593 COLUMN 104.
ERROR: LIMIT SET BY ERRORS= OPTION reached.  Further errors of this type will NOT be printed.
SUB_ID=001-00069 D0=7.0710678119 F_AGE_DV=79.8 F_SK_CL=Type V heart=N popu3=. _ERROR_=1 _N_=750
NOTE: There were 40777 observations READ FROM the DATA SET MYLIB.SOUCHE.
NOTE: The DATA SET WORK.POPU3 has 40777 observations AND 6 VARIABLES.
NOTE: DATA statement used (Total process time):
      real time           2.53 seconds
      cpu time            0.09 seconds
et la je ne comprend pas pk j ai cette erreur mon code sembe bon
asty69 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 10/06/2011, 14h03   #2
Modérateur
 
Homme Samir SELMANE
Consultant en Business Intelligence
Inscription : février 2011
Messages : 1 006
Détails du profil
Informations personnelles :
Nom : Homme Samir SELMANE
Localisation : France

Informations professionnelles :
Activité : Consultant en Business Intelligence
Secteur : Conseil

Informations forums :
Inscription : février 2011
Messages : 1 006
Points : 1 703
Points : 1 703
cette variable popu3 est numérique ou caractère. ??
s_a_m est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 10/06/2011, 14h13   #3
Membre à l'essai
 
Inscription : novembre 2009
Messages : 107
Détails du profil
Informations forums :
Inscription : novembre 2009
Messages : 107
Points : 20
Points : 20
popu3 est numérique
mais le problème c est
Code :
((F_SK_CL="Type III") OR (F_SK_CL="Type IV"))
quand je rajoute ce morceau de code j ai des erreurs
asty69 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 10/06/2011, 15h35   #4
Modérateur
 
Homme Samir SELMANE
Consultant en Business Intelligence
Inscription : février 2011
Messages : 1 006
Détails du profil
Informations personnelles :
Nom : Homme Samir SELMANE
Localisation : France

Informations professionnelles :
Activité : Consultant en Business Intelligence
Secteur : Conseil

Informations forums :
Inscription : février 2011
Messages : 1 006
Points : 1 703
Points : 1 703
tu peux exécuter ce programme pour voir de quel type sont tes variables?
Code :
1
2
3
4
 
proc sql noprint;
    DESCRIBE TABLE mylib.SOUCHE ;
quit;
s_a_m est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 10/06/2011, 16h07   #5
Membre à l'essai
 
Inscription : novembre 2009
Messages : 107
Détails du profil
Informations forums :
Inscription : novembre 2009
Messages : 107
Points : 20
Points : 20
merci
F_SK_CL num format=F_TYPE. informat=2. label='Skin Phototypes',

entre temps j avais trouve le probleme avec l aide mega mind

et je trouve ca un peu tordu
je reviendrai dessus ce soir pour plus d explication
asty69 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 10/06/2011, 16h32   #6
Modérateur
 
Homme Samir SELMANE
Consultant en Business Intelligence
Inscription : février 2011
Messages : 1 006
Détails du profil
Informations personnelles :
Nom : Homme Samir SELMANE
Localisation : France

Informations professionnelles :
Activité : Consultant en Business Intelligence
Secteur : Conseil

Informations forums :
Inscription : février 2011
Messages : 1 006
Points : 1 703
Points : 1 703
Citation:
Envoyé par asty69 Voir le message
merci
F_SK_CL num format=F_TYPE. informat=2. label='Skin Phototypes',

entre temps j avais trouve le probleme avec l aide mega mind

et je trouve ca un peu tordu
je reviendrai dessus ce soir pour plus d explication
numérique, et tu le traites en tant que caractère. !!!
En ce qui concerne la sollution de MEGE MEND on la voie pas.
s_a_m est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 04h54.


 
 
 
 
Partenaires

Hébergement Web