Précédent   Forum des professionnels en informatique > Bases de données > DB2
DB2 Forum d'entraide technique sur la base de données DB2. Voir aussi -> Rubrique DB2
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 18/03/2011, 16h01   #1
Membre actif
 
Inscription : juin 2008
Messages : 146
Détails du profil
Informations personnelles :
Âge : 44

Informations forums :
Inscription : juin 2008
Messages : 146
Points : 183
Points : 183
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 :
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 :
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.
pdz74 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 19/03/2011, 19h35   #2
Membre Expert

 
Homme François Durand
Spécialiste Delivery Mainframe IBM
Inscription : octobre 2005
Messages : 1 096
Détails du profil
Informations personnelles :
Nom : Homme François Durand
Âge : 53
Localisation : France, Seine Saint Denis (Île de France)

Informations professionnelles :
Activité : Spécialiste Delivery Mainframe IBM
Secteur : Finance

Informations forums :
Inscription : octobre 2005
Messages : 1 096
Points : 1 704
Points : 1 704
Peut-être un débordement de zone mémoire du programme (table ou autre ... ) ?
Luc Orient est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 21/03/2011, 06h17   #3
Membre chevronné
 
Avatar de bernard59139
 
Administrateur de base de données
Inscription : octobre 2006
Messages : 502
Détails du profil
Informations personnelles :
Localisation : France

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

Informations forums :
Inscription : octobre 2006
Messages : 502
Points : 687
Points : 687
Bonjour

La proc de compil est-elle à jour?

Pouvez-vous postez la zone de SQLDA?

bonne journée
bernard59139 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 21/03/2011, 10h50   #4
Nouveau Membre du Club
 
Inscription : janvier 2008
Messages : 42
Détails du profil
Informations personnelles :
Localisation : France, Hérault (Languedoc Roussillon)

Informations forums :
Inscription : janvier 2008
Messages : 42
Points : 35
Points : 35
Hello, à tout hasard, tu aurais pas dans la syntaxe de l'OPEN une simple cote à la place d'une double cote ?
battistuta est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 21/03/2011, 11h09   #5
Membre actif
 
Inscription : juin 2008
Messages : 146
Détails du profil
Informations personnelles :
Âge : 44

Informations forums :
Inscription : juin 2008
Messages : 146
Points : 183
Points : 183
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 :
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)
pdz74 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 21/03/2011, 13h17   #6
Membre actif
 
Inscription : juin 2008
Messages : 146
Détails du profil
Informations personnelles :
Âge : 44

Informations forums :
Inscription : juin 2008
Messages : 146
Points : 183
Points : 183
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.
pdz74 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/03/2011, 13h38   #7
Membre actif
 
Inscription : juin 2008
Messages : 146
Détails du profil
Informations personnelles :
Âge : 44

Informations forums :
Inscription : juin 2008
Messages : 146
Points : 183
Points : 183
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.
pdz74 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 22h32.


 
 
 
 
Partenaires

Hébergement Web