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

DB2 Discussion :

SQLCODE -804 sous ZOS


Sujet :

DB2

  1. #1
    Membre actif
    Inscrit en
    Juin 2008
    Messages
    154
    Détails du profil
    Informations personnelles :
    Âge : 56

    Informations forums :
    Inscription : Juin 2008
    Messages : 154
    Points : 225
    Points
    225
    Par défaut SQLCODE -804 sous ZOS
    Bonjour,

    Quelqu'un a t'il déjà été confronté à un SQLCODE -804 lors de l'OPEN d'un curseur. Cela me parait totalement incompréhensible. C'est un programme existant qu'on vient de modifier. Et lors de l'ouverture de plusieurs curseurs (déjà existants et non modifiés ou nouveaux curseurs), on se retrouve avec un -804.

    Ci-joint un copier/coller de la SQLCA.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    01 SQLCA                          GROUP                        
    02 SQLCAID                        X(8)             SQLCA       
    02 SQLCABC                        S9(9) COMP       +00000136   
    02 SQLCODE                        S9(9) COMP       -00000804   
    02 SQLERRM                        GROUP                        
    03 SQLERRML                       S9(4) COMP       +0002       
    03 SQLERRMC                       X(70)            06          
    02 SQLERRP                        X(8)             DSNXECP     
    02 SQLERRD                        S9(9) COMP       -00000209   
    OCCURS 6 TIMES                                     1
    Et ci-joint un copier/coller de la doc IBM

    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
    -804 AN ERROR WAS FOUND IN THE APPLICATION PROGRAM INPUT PARAMETERS FOR THE SQL STATEMENT, REASON reason
     
    Explanation: The call parameter list or the SQLDA isinvalid.
    - The call parameter list, which is created by the precompiler, might be invalid if the application programmer has modified the output of the precompiler, used a variable name beginning with ’SQL’ in the application program, or overwritten the call parameter list in some other way.
    - The SQLDA, which is created by the application program, has an invalid data type or data length.
    - The value of SQLDABC is not consistent with the value of SQLD.
     
    The following is the list of reason codes:
    01 Open issued for non-cursor.
    02 Close issued for non-cursor.
    03 Prepare of EXECUTE IMMEDIATE.
    04 Statement is not recognized.
    05 No statement string present.
    06 Bad SQLDA format in parameter list.
    07 SQLDA length is invalid.
    08 Unrecognized input data type.
    09 Invalid length for input variable.
    10 Invalid data length for output variable.
    11 The value of SQLDABC is not consistent with the value of SQLD.
    12 Invalid input data pointer.
    13 Invalid output data pointer.
    14 SQLN has too many items for SQLDABC.
    15 Input RDI pointer is invalid.
    16 Unrecognized output data type.
    17 The value of the 7th byte of SQLDAID is not consistent with the data types contained in the SQLDA. The SQLDA contains a LOB type host variable, but the 7th byte of SQLDAID is not set to2or greater to indicate that the extended SQLVARs have been allocated.
     
    System action: The statement cannot be executed.
     
    System programmer response: Examine the application program for any of the errors noted under the explanation above. In general, the application programmer should not attempt to modify the output of the precompiler.
    SQLSTATE: 07002
    Et pour info, nous n'avons pas de host variable commençant par SQL.

    Merci d'avance.

  2. #2
    Membre expert
    Homme Profil pro
    Retraité
    Inscrit en
    Octobre 2005
    Messages
    1 473
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 65
    Localisation : France, Seine Saint Denis (Île de France)

    Informations professionnelles :
    Activité : Retraité
    Secteur : Finance

    Informations forums :
    Inscription : Octobre 2005
    Messages : 1 473
    Points : 3 283
    Points
    3 283
    Par défaut
    Peut-être un débordement de zone mémoire du programme (table ou autre ... ) ?

  3. #3
    Membre chevronné Avatar de bernard59139
    Profil pro
    Administrateur de base de données
    Inscrit en
    Octobre 2006
    Messages
    950
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations professionnelles :
    Activité : Administrateur de base de données

    Informations forums :
    Inscription : Octobre 2006
    Messages : 950
    Points : 2 064
    Points
    2 064
    Par défaut
    Bonjour

    La proc de compil est-elle à jour?

    Pouvez-vous postez la zone de SQLDA?

    bonne journée

  4. #4
    Membre du Club
    Profil pro
    Inscrit en
    Janvier 2008
    Messages
    42
    Détails du profil
    Informations personnelles :
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations forums :
    Inscription : Janvier 2008
    Messages : 42
    Points : 44
    Points
    44
    Par défaut
    Hello, à tout hasard, tu aurais pas dans la syntaxe de l'OPEN une simple cote à la place d'une double cote ?

  5. #5
    Membre actif
    Inscrit en
    Juin 2008
    Messages
    154
    Détails du profil
    Informations personnelles :
    Âge : 56

    Informations forums :
    Inscription : Juin 2008
    Messages : 154
    Points : 225
    Points
    225
    Par défaut
    Pour battistuta, malheureusement non, pas de simple quote. En général, ça se traduit plutôt par un -206.

    Pour bernard59139, ci-joint la SQLDA.

    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
    01 SQLDA                          GROUP                                   
    02 SQLDAID                        X(8)             ........               
    02 SQLDABC                        S9(9) COMP       +00000000              
    02 SQLN                           S9(4) COMP       +0000                  
    02 SQLD                           S9(4) COMP       +0000                  
    02 SQLVAR                         GROUP                                   
    OCCURS 0:750 TIMES                                 0                      
    03 SQLVAR1                        GROUP                                   
    OCCURS 0:750 TIMES                                 0                      
    04 SQLTYPE                        S9(4) COMP       ODO FLD DEP ON INV OR 0
    OCCURS 0:750 TIMES                                 0                      
    04 SQLLEN                         S9(4) COMP       ODO FLD DEP ON INV OR 0
    OCCURS 0:750 TIMES                                 0                      
    04 FILLER                         GROUP                                   
    OCCURS 0:750 TIMES                                 0                      
    05 SQLPRECISION                   X                ODO FLD DEP ON INV OR 0
    OCCURS 0:750 TIMES                                 0                      
    05 SQLSCALE                       X                ODO FLD DEP ON INV OR 0
    OCCURS 0:750 TIMES                                 0                      
    04 SQLDATA                        POINTER          ODO FLD DEP ON INV OR 0
    OCCURS 0:750 TIMES                                 0                      
    04 SQLIND                         POINTER          ODO FLD DEP ON INV OR 0
    OCCURS 0:750 TIMES                                 0                      
    04 SQLNAME                        GROUP                                   
    OCCURS 0:750 TIMES                                 0                      
    05 SQLNAMEL                       S9(4) COMP       ODO FLD DEP ON INV OR 0
    OCCURS 0:750 TIMES                                 0                      
    05 SQLNAMEC                       X(30)            ODO FLD DEP ON INV OR 0
    OCCURS 0:750 TIMES                                 0                      
    03 SQLVAR2                        GROUP                                   
    OCCURS 0:750 TIMES                                 0                      
    04 SQLVAR2-RESERVED-1             S9(9) COMP       ODO FLD DEP ON INV OR 0
    OCCURS 0:750 TIMES                                 0                      
    04 SQLLONGLEN                     S9(9) COMP       ODO FLD DEP ON INV OR 0
    OCCURS 0:750 TIMES                                 0                      
    04 SQLVAR2-RESERVED-2             S9(9) COMP       ODO FLD DEP ON INV OR 0
    OCCURS 0:750 TIMES                                 0                      
    04 SQLDATALEN                     POINTER          ODO FLD DEP ON INV OR 0
    OCCURS 0:750 TIMES                                 0                      
    04 SQLDATATYPE-NAME               GROUP                                   
    OCCURS 0:750 TIMES                                 0                      
    05 SQLDATATYPE-NAMEL              S9(4) COMP       ODO FLD DEP ON INV OR 0
    OCCURS 0:750 TIMES                                 0                      
    05 SQLDATATYPE-NAMEC              X(30)            ODO FLD DEP ON INV OR 0
    OCCURS 0:750 TIMES                                 0                      
    01 FILLER                         GROUP                                   
    02 WW-DATE                        S9(08) COMP-3    +020110321             
    02 WW-DELIEN                      S9(08) COMP-3    +000000000             
    02 WW-DFLIEN                      S9(08) COMP-3    +000000000             
    02 WW-IDPART                      X(15)            00000000205682  
    02 WW-UTIDPART                    X(15)            00000303643960  
    02 WW-IDELCO                      X(15)            ..ä&&Éc..LL.... 
    02 WW-UTIDELCO                    X(15)            .... ..<.ÍT.... 
    02 WW-IDCTRA                      X(15)            .... ..<.ÍT.... 
    02 WW-IDCDPR                      S9(05) COMP-3    +00440          
    02 WW-IDCDPR-SIGN                 S9(05) COMP-3    +00411          
    02 WW-IOFFRE-SIGN                 S9(05) COMP-3    +02510          
    02 WW-IDCANA                      X(02)            00              
    02 WW-IDCANA1                     X(02)            00              
    02 WW-LCMEDI                      X(10)                            
    02 WW-LCMEDI1                     X(10)                            
    02 WW-LIACC                       X(50)                            
    02 WW-CPRESS                      X                                
    02 WW-CDPALT                      S99 COMP-3       +000            
    02 WW-NCPTE                       S9(11) COMP-3    +00000000000    
    02 WW-LIAPUS                      X(10)                            
    02 WW-LILIG1                      X(32)                             
    02 WW-LNPROD                      X(32)            ACCES UTIL.      
    02 WW-IFBQAS                      X(15)                             
    02 WW-IDSSFB                      X(3)                              
    02 WW-LFBQAS                      X(32)                             
    02 WW-CTMOD                       X(01)                             
    02 WW-CDNIV                       X(01)                             
    02 WW-LINIV                       X(32)                             
    02 WW-IDTYOR                      X(02)                             
    02 WW-IDTORD                      X(03)                             
    02 WW-LCTYOR                      X(10)                             
    02 WW-LCTORD                      X(10)                             
    02 WW-MPFLIM                      S9(11) COMP-3    +00000000000     
    02 WW-SEL0                        X                                 
    02 WW-SEL1                        X                                 
    02 WW-SEL2                        X                                 
    02 WW-IDCDP2                      S9(5) COMP-3     +00000           
    02 WW-IDCANA2                     X(2)             00                   
    02 WW-CTFAC2                      X                                     
    02 WW-PROD                        S9(5) COMP-3     +00000               
    02 WW-DEC                         S9(11) COMP-3    +00000000000         
    02 WW-NCPTE2                      X(11)                                 
    02 WW-CDETBA                      S9(5) COMP-3     +00000               
    02 WW-CDGBDF                      S9(5) COMP-3     +00000               
    02 WW-LNBECC                      X(24)                                 
    02 WW-LILIST                      X(12)                                 
    02 WW-IDLIST                      X(15)                                 
    02 WW-IDBAM                       X(11)            62245403840          
    02 WW-IDBAM-SIGN                  X(11)            66324533960          
    02 WW-DDFONC-SIGN                 S9(08) COMP-3    +020090213           
    02 WW-IDPART-SIGN                 X(15)            00000000205682       
    02 WW-CDPAYS                      S9(3) COMP-3     +140                 
    02 WW-LIPAYS                      X(24)            SUISSE               
    02 WW-CDFCT8                      X(2)             03                   
    02 WW-LIFAMD                      X(35)                  
    02 WW-CCFAMB                      S9(3) COMP-3     +000  
    02 WW-CDBIC                       X(11)                  
    02 WW-NOIBAN                      X(34)                  
    02 WW-LIDEST                      X(32)

  6. #6
    Membre actif
    Inscrit en
    Juin 2008
    Messages
    154
    Détails du profil
    Informations personnelles :
    Âge : 56

    Informations forums :
    Inscription : Juin 2008
    Messages : 154
    Points : 225
    Points
    225
    Par défaut
    Petite info complémentaire. J'ai trouvé dans la doc (en italique) :

    Enhanced data type checking for zero-length characters

    In Version 9.1, when you specify a CHAR data type with a length of 0 in the
    SQLDA, DB2 issues SQLCODE -804 regardless of the null indicator value


    Mais j'ai beau chercher, je ne vois aucune donnée avec une longueur de 0 dans la SQLDA.

  7. #7
    Membre actif
    Inscrit en
    Juin 2008
    Messages
    154
    Détails du profil
    Informations personnelles :
    Âge : 56

    Informations forums :
    Inscription : Juin 2008
    Messages : 154
    Points : 225
    Points
    225
    Par défaut
    Bonjour,

    Après pas mal de tâtonnements, confirmation que le souci ne venait pas de DB2. Juste avant l'OPEN cursor, il y avait un ss-pro qui plantait par abend asra. Un souci de commaréa du ss-pro faisait qu'en retour, il y avait écrasement de zone mémoire, comme l'avait sugéré Luc Orient. Et on se retrouvait avec ce SQLCODE incompréhensible juste ensuite. Bref, c'est tout bon aujourd'hui.

    Merci à tous pour vos recherches et votre intéret.

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

Discussions similaires

  1. Zos sous Hercules
    Par patsam15 dans le forum z/OS
    Réponses: 0
    Dernier message: 29/10/2013, 12h49
  2. SQLCODE -387 sous Z-OS.
    Par pdz74 dans le forum DB2
    Réponses: 7
    Dernier message: 14/08/2009, 08h11
  3. Insertion image externe dans une report sous ZoS
    Par Bunzy dans le forum ODS et reporting
    Réponses: 2
    Dernier message: 22/07/2009, 16h27
  4. Export CSV sous guide branché sur ZoS
    Par Bunzy dans le forum ODS et reporting
    Réponses: 4
    Dernier message: 20/05/2009, 10h41
  5. Recopié un fichier au format U en binaire sous ZOS
    Par Kyle Katarn dans le forum z/OS
    Réponses: 6
    Dernier message: 12/11/2008, 09h49

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