IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

SAS Base Discussion :

Problème sur une création de table !


Sujet :

SAS Base

  1. #1
    Membre habitué Avatar de pierre24
    Profil pro
    Inscrit en
    Février 2008
    Messages
    391
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : France

    Informations forums :
    Inscription : Février 2008
    Messages : 391
    Points : 160
    Points
    160
    Par défaut Problème sur une création de table !
    Bonjour voici le programme que j'utilise pour "tenter" de creer un table SAS :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
     
     
    DM 'LISTING OFF;CLEAR;LOG;CLEAR;OUTPUT';                              
     
    /********************************************************************/
    /* FICINVAR                                                         */
    /*                                                                  */
    /* OBJECTIF:   RECEPTION FICHIER EXTERNE  DE LONGUEUR VARIABLE      */
    /*                                                                  */
    /********************************************************************/
     
    %INCLUDE "STDATC20 SAS K";                                            
     
    OPTIONS MISSING='';                                                   
    FILENAME TNSIN 'ADRPOST TEXT K';                                      
    DATA TEMP00 ;                                                         
    INFILE TNSIN dlm=';'   dsd  ;                                         
    LENGTH        IDENREG  $5.                                            
                  CDSYS    $2.                                            
                  NOLOT    $8.                                            
                  IDCNT    $30.                                           
                  IDPERS   $15.                                           
     
                  DTEXTRAC YYMMDD8.                      
                  TYPADPOS $4.                           
                  ADRES1   $38.                          
                  ADRES2   $38.                          
                  ADRES3   $38.                          
                  ADRES4   $38.                          
                  CDPOST   $5.                           
                  COMM     $38.                          
                  PAYS     $38.                          
                  FREEADRE $45.;                         
    INPUT         IDENREG                                
                  CDSYS                                  
                  NOLOT                                  
                  IDCNT                                  
                  IDPERS                                 
                  DTEXTRAC                               
                  TYPADPOS                               
                  ADRES1                                 
                  ADRES2                                 
                  ADRES3                                 
     
                  ADRES4                                    
                  CDPOST                                    
                  COMM                                      
                  PAYS                                      
                  FREEADRE;                                 
    OUTPUT TEMP00;                                          
    RUN;                                                    
     
    OPTIONS LS=150 PS=60  MISSING=' ' PAGENO=1 ;            
    TITLE FOOTNOTE;                                         
    PROC PRINT DATA=TEMP00  ;                               
    RUN;
    Et voici la LOG

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
     
     
     
    DM 'LISTING OFF;CLEAR;LOG;CLEAR;OUTPUT'                               
                                           ;                              
     
    /********************************************************************/
    /* FICINVAR                                                         */
    /*                                                                  */
    /* OBJECTIF:   RECEPTION FICHIER EXTERNE  DE LONGUEUR VARIABLE      */
    /*                                                                  */
    /********************************************************************/
     
    %INCLUDE "STDATC20 SAS K";                                            
     Libref GP was successfully assigned as follows:                      
     Engine:        V609                                                  
     Physical Name: GP       K1                                           
     Libref GRCH was successfully assigned as follows:                    
     Engine:        V609                                                  
     Physical Name: GRCH     K1                                           
     Libref GRCH was successfully assigned as follows:                    
     Engine:        V609                                                  
     Physical Name: GRCH     K1                                           
     
    NOTE: Libref GRCM was successfully assigned as follows:            
          Engine:        V609                                          
          Physical Name: GRCM     K1                                   
    97                                                                 
    98   OPTIONS MISSING='';                                           
    99   FILENAME TNSIN 'ADRPOST TEXT K';                              
    100  DATA TEMP00 ;                                                 
    101  INFILE TNSIN dlm=';'   dsd  ;                                 
    102  LENGTH        IDENREG  $5.                                    
    103                CDSYS    $2.                                    
    104                NOLOT    $8.                                    
    105                IDCNT    $30.                                   
    106                IDPERS   $15.                                   
    107                DTEXTRAC YYMMDD8.                               
    108                TYPADPOS $4.                                    
    109                ADRES1   $38.                                   
    391: LINE and COLUMN cannot be determined.                         
    ERROR 391-185: Expecting a variable length specification.          
    201: LINE and COLUMN cannot be determined.                         
    ERROR 201-322: The option is not recognized.                       
     
    109                ADRES1   $38.                                  
                       ------                                         
                       391                                            
    ERROR 391-185: Expecting a variable length specification.         
     
    110                ADRES2   $38.                                  
    111                ADRES3   $38.                                  
    112                ADRES4   $38.                                  
    113                CDPOST   $5.                                   
    114                COMM     $38.                                  
    115                PAYS     $38.                                  
    116                FREEADRE $45.;                                 
    117  INPUT         IDENREG                                        
    118                CDSYS                                          
    119                NOLOT                                          
    120                IDCNT                                          
    121                IDPERS                                         
    122                DTEXTRAC                                       
    123                TYPADPOS                                       
    124                ADRES1                                         
     
    125                ADRES2                                                  
    126                ADRES3                                                  
    127                ADRES4                                                  
    128                CDPOST                                                  
    129                COMM                                                    
    130                PAYS                                                    
    131                FREEADRE;                                               
    132  OUTPUT TEMP00;                                                        
    133  RUN;                                                                  
     
    NOTE: The SAS System stopped processing this step because of errors.       
    WARNING: The data set WORK.TEMP00 may be incomplete.  When this step was   
             stopped there were 0 observations and 15 variables.               
     
    134                                                                        
    135  OPTIONS LS=150 PS=60  MISSING=' ' PAGENO=1 ;                          
    136  TITLE FOOTNOTE;                                                       
    137  PROC PRINT DATA=TEMP00  ;                                             
    138  RUN;                                                                  
                                                                               DM 'LISTING OFF;CLEAR;LOG;CLEAR;OUTPUT'                               
                                           ;                              
     
    /********************************************************************/
    /* FICINVAR                                                         */
    /*                                                                  */
    /* OBJECTIF:   RECEPTION FICHIER EXTERNE  DE LONGUEUR VARIABLE      */
    /*                                                                  */
    /********************************************************************/
     
    %INCLUDE "STDATC20 SAS K";                                            
     Libref GP was successfully assigned as follows:                      
     Engine:        V609                                                  
     Physical Name: GP       K1                                           
     Libref GRCH was successfully assigned as follows:                    
     Engine:        V609                                                  
     Physical Name: GRCH     K1                                           
     Libref GRCH was successfully assigned as follows:                    
     Engine:        V609                                                  
     Physical Name: GRCH     K1                                           
     
    NOTE: Libref GRCM was successfully assigned as follows:            
          Engine:        V609                                          
          Physical Name: GRCM     K1                                   
    97                                                                 
    98   OPTIONS MISSING='';                                           
    99   FILENAME TNSIN 'ADRPOST TEXT K';                              
    100  DATA TEMP00 ;                                                 
    101  INFILE TNSIN dlm=';'   dsd  ;                                 
    102  LENGTH        IDENREG  $5.                                    
    103                CDSYS    $2.                                    
    104                NOLOT    $8.                                    
    105                IDCNT    $30.                                   
    106                IDPERS   $15.                                   
    107                DTEXTRAC YYMMDD8.                               
    108                TYPADPOS $4.                                    
    109                ADRES1   $38.                                   
    391: LINE and COLUMN cannot be determined.                         
    ERROR 391-185: Expecting a variable length specification.          
    201: LINE and COLUMN cannot be determined.                         
    ERROR 201-322: The option is not recognized.                       
     
    109                ADRES1   $38.                                  
                       ------                                         
                       391                                            
    ERROR 391-185: Expecting a variable length specification.         
     
    110                ADRES2   $38.                                  
    111                ADRES3   $38.                                  
    112                ADRES4   $38.                                  
    113                CDPOST   $5.                                   
    114                COMM     $38.                                  
    115                PAYS     $38.                                  
    116                FREEADRE $45.;                                 
    117  INPUT         IDENREG                                        
    118                CDSYS                                          
    119                NOLOT                                          
    120                IDCNT                                          
    121                IDPERS                                         
    122                DTEXTRAC                                       
    123                TYPADPOS                                       
    124                ADRES1                                         
     
    125                ADRES2                                                  
    126                ADRES3                                                  
    127                ADRES4                                                  
    128                CDPOST                                                  
    129                COMM                                                    
    130                PAYS                                                    
    131                FREEADRE;                                               
    132  OUTPUT TEMP00;                                                        
    133  RUN;                                                                  
     
    NOTE: The SAS System stopped processing this step because of errors.       
    WARNING: The data set WORK.TEMP00 may be incomplete.  When this step was   
             stopped there were 0 observations and 15 variables.               
     
    134                                                                        
    135  OPTIONS LS=150 PS=60  MISSING=' ' PAGENO=1 ;                          
    136  TITLE FOOTNOTE;                                                       
    137  PROC PRINT DATA=TEMP00  ;                                             
    138  RUN;
    Je suis sur cette erreur de plus d'un jours nerve je n'arrive pas a comprendre aider moi !

  2. #2
    Membre émérite

    Homme Profil pro
    Consultant en Business Intelligence
    Inscrit en
    Mars 2005
    Messages
    1 364
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val de Marne (Île de France)

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

    Informations forums :
    Inscription : Mars 2005
    Messages : 1 364
    Points : 2 329
    Points
    2 329
    Par défaut
    Je pense qu'il faut :
    length...
    DTEXTRAC YYMMDD8.
    remplacer par
    length
    DTEXTRAC 8.

    YYMMDD8. c'est un format alors que tu défini une longeur.

    je te conseille de mettre des $ devant les noms des varaibles dans l'input quand le format est caractère.

  3. #3
    Membre habitué Avatar de pierre24
    Profil pro
    Inscrit en
    Février 2008
    Messages
    391
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : France

    Informations forums :
    Inscription : Février 2008
    Messages : 391
    Points : 160
    Points
    160
    Par défaut
    Merci beaucoup le probleme venait en fait de cela !

  4. #4
    Membre émérite

    Homme Profil pro
    Consultant en Business Intelligence
    Inscrit en
    Mars 2005
    Messages
    1 364
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val de Marne (Île de France)

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

    Informations forums :
    Inscription : Mars 2005
    Messages : 1 364
    Points : 2 329
    Points
    2 329
    Par défaut
    Clique sur RESOLU

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [2008R2] Problème sur une procédure pivot + création de table
    Par libremax dans le forum MS SQL Server
    Réponses: 3
    Dernier message: 14/10/2014, 21h21
  2. Problème sur une seule des tables de la database
    Par Annsen dans le forum Administration
    Réponses: 4
    Dernier message: 01/06/2011, 15h47
  3. Problème sur une requête simple dans une table simple
    Par Muso tensei dans le forum PostgreSQL
    Réponses: 3
    Dernier message: 26/04/2009, 12h28
  4. Problème sur une requête de mise à jour entre 2 tables
    Par Throbb dans le forum Requêtes et SQL.
    Réponses: 4
    Dernier message: 04/03/2009, 14h43
  5. Réponses: 2
    Dernier message: 10/02/2006, 14h46

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo