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

Interfaces de programmation Oracle Discussion :

[PRO*COBOL] Manipulation de LOB


Sujet :

Interfaces de programmation Oracle

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Candidat au Club
    Inscrit en
    Avril 2007
    Messages
    2
    Détails du profil
    Informations forums :
    Inscription : Avril 2007
    Messages : 2
    Par défaut [PRO*COBOL] Manipulation de LOB
    Bonjour,

    je souhaiterais manipuler des tables Oracle 9i contenant des champs de type LOB. Les programmes sont en COBOL et il s'agit d'ordre SQL Embedded.
    Nous avons réussi à coder les ordres pour manipuler des CLOB malheureusement en ce qui concerne les BLOB nous nous faisons jeter par le pré compilateur PRO*COBOL :

    PCB-S-00628, Buffer type is incompatible with LOB type

    Quelqu'un aurait-il des exemples de programmes Cobol manipulant ces objets et particulièrement les BLOB ?

    Merci pour votre aide.

  2. #2
    Rédacteur
    Avatar de Vincent Rogier
    Profil pro
    Inscrit en
    Juillet 2007
    Messages
    2 373
    Détails du profil
    Informations personnelles :
    Âge : 47
    Localisation : France

    Informations forums :
    Inscription : Juillet 2007
    Messages : 2 373
    Par défaut
    Salut !

    doc PRO*COBOL (en anglais) => [HTML] ou [PDF]

    Ta variable doit être déclaré sous un mauvais type..

    Pour les BLOB sous COBOL, c'est SQL-BLOB.

    PS : penses à tagger avec [PRO*COBOL] dans tu postes dans ce forum, stp !

    Description de ton erreur :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    Oracle Error :: PCB-00628
    
    Buffer type is incompatible with LOB type
    
    Cause
    
    This error can occur in either of the following situations
    1. An attempt to READ from a LOB into a buffer whose type was not compatible with the LOB type.
    2. An attempt to WRITE a buffer into a LOB whose type was not compatible with the buffer type.
    Action
    
    Either the LOB type or the buffer type needs to be changed so that the LOB and buffer types become compatible for the specified operation.
    Je suis pas malheureusement pas Coboliste...


    Voici la demo de la doc (LOBDEMO1.PCO):

    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
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
     
    *********************************************************************
    * LOB Demo 1: DMV Database *
    * *
    * SCENARIO: *
    * *
    * We consider the example of a database used to store driver's *
    * licenses. The licenses are stored as rows of a table containing *
    * three columns: the sss number of a person, his/her name and the *
    * text summary of the info found in his license. *
    * *
    * The sss number and the name are the unique social security number *
    * and name of an individual. The text summary is a summary of the *
    * information on the individual, including his driving record, *
    * which can be arbitrarily long and may contain comments and data *
    * regarding the person's driving ability. *
    * *
    * APPLICATION OVERVIEW: *
    * *
    * This example demonstrate how a Pro*COBOL client can handle the *
    * new LOB datatypes. Demonstrated are the mechanisms for accessing *
    * and storing lobs to/from tables. *
    * *
    * To run the demo: *
    * *
    * 1. Execute the script, lobdemo1.sql in Server Manager *
    * 2. Precompile using Pro*COBOL *
    * procob lobdemo1 *
    * 3. Compile/Link (This step is platform specific) *
    * *
    * lobdemo1.sql contains the following SQL statements: *
    * *
    * connect scott/tiger; *
    * *
    * drop table license_table; *
    * *
    LOB Sample Program: LOBDEMO1.PCO
    13-22 Pro*COBOL Programmer’s Guide
    * create table license_table( *
    * sss char(9), *
    * name varchar2(50), *
    * txt_summary clob); *
    * *
    * insert into license_table *
    * values('971517006', 'Dennis Kernighan', *
    * 'Wearing a Bright Orange Shirt'); *
    * *
    * insert into license_table *
    * values('555001212', 'Eight H. Number', *
    * 'Driving Under the Influence'); *
    * *
    * insert into license_table *
    * values('010101010', 'P. Doughboy', *
    * 'Impersonating An Oracle Employee'); *
    * *
    * insert into license_table *
    * values('555377012', 'Calvin N. Hobbes', *
    * 'Driving Under the Influence'); *
    * *
    * The main program provides the menu of actions that can be *
    * performed. The program stops when the number 5 (Quit) option *
    * is entered. Depending on the input, this main program calls *
    * the appropriate nested program to execute the chosen action. *
    * *
    *********************************************************************
    IDENTIFICATION DIVISION.
    PROGRAM-ID. LOBDEMO1.
    DATA DIVISION.
    WORKING-STORAGE SECTION.
    01 USERNAME PIC X(5).
    01 PASSWD PIC X(5).
    01 CHOICE PIC 9 VALUE 0.
    01 SSS PIC X(9).
    01 SSSEXISTS PIC 9 VALUE ZERO.
    01 LICENSE-TXT SQL-CLOB .
    01 NEWCRIME PIC X(35) VARYING.
    01 SSSCOUNT PIC S9(4) COMP.
    01 THE-STRING PIC X(200) VARYING.
    01 TXT-LENGTH PIC S9(9) COMP.
    01 CRIMES.
    05 FILLER PIC X(35) VALUE "Driving Under the Influence".
    05 FILLER PIC X(35) VALUE "Grand Theft Auto".
    05 FILLER PIC X(35) VALUE "Driving Without a License".
    05 FILLER PIC X(35) VALUE
    "Impersonating an Oracle Employee".
    05 FILLER PIC X(35) VALUE "Wearing a Bright Orange Shirt".
    01 CRIMELIST REDEFINES CRIMES.
    05 CRIME PIC X(35) OCCURS 5 TIMES.
    01 CRIME-INDEX PIC 9.
    01 TXT-LEN PIC S9(9) COMP.
    01 CRIME-LEN PIC S9(9) COMP.
    01 NAME1 PIC X(50) VARYING.
    01 NEWNAME PIC X(50).
    *********************************************************************
    EXEC SQL INCLUDE SQLCA END-EXEC.
    PROCEDURE DIVISION.
    A000-CONTROL SECTION.
    *********************************************************************
    * A000-CONTROL
    * Overall control section
    *********************************************************************
    A000-CNTRL.
    EXEC SQL
    WHENEVER SQLERROR DO PERFORM Z900-SQLERROR
    END-EXEC.
    PERFORM B000-LOGON.
    PERFORM C000-MAIN UNTIL CHOICE = 5.
    PERFORM D000-LOGOFF.
    A000-EXIT.
    STOP RUN.
    B000-LOGON SECTION.
    *********************************************************************
    * B000-LOGON
    * Log on to database.
    *********************************************************************
    B000-LGN.
    DISPLAY '**************************************************'.
    DISPLAY '* Welcome to the DMV Database *'.
    DISPLAY '**************************************************'.
    MOVE "scott" TO USERNAME.
    MOVE "tiger" TO PASSWD.
    EXEC SQL
    CONNECT :USERNAME IDENTIFIED BY :PASSWD
    END-EXEC.
    DISPLAY " ".
    DISPLAY "Connecting to license database account: ",
    USERNAME, "/", PASSWD.
    DISPLAY " ".
    B000-EXIT.
    EXIT.
    C000-MAIN SECTION.
    *********************************************************************
    * C000-MAIN
    * Display the main menu and action requests
    *********************************************************************
    C000-MN.
    DISPLAY " ".
    DISPLAY "License Options:".
    DISPLAY "1. List available records by SSS number".
    DISPLAY "2. Get information on a particular record".
    DISPLAY "3. Add crime to a record".
    DISPLAY "4. Insert new record to database".
    DISPLAY "5. Quit".
    DISPLAY " ".
    MOVE ZERO TO CHOICE.
    PERFORM Z300-ACCEPT-CHOICE UNTIL CHOICE < 6
    AND CHOICE > 0.
    IF (CHOICE = 1)
    PERFORM C100-LIST-RECORDS.
    IF (CHOICE = 2)
    PERFORM C200-GET-RECORD.
    IF (CHOICE = 3)
    PERFORM C300-ADD-CRIME.
    LOB Sample Program: LOBDEMO1.PCO
    13-24 Pro*COBOL Programmer’s Guide
    IF (CHOICE = 4)
    PERFORM C400-NEW-RECORD.
    C000-EXIT.
    EXIT.
    C100-LIST-RECORDS SECTION.
    *********************************************************************
    * C100-LIST-RECORDS
    * Select Social Security Numbers from LICENCSE_TABLE
    * and display the list
    *********************************************************************
    C100-LST.
    EXEC SQL DECLARE SSS_CURSOR CURSOR FOR
    SELECT SSS FROM LICENSE_TABLE
    END-EXEC.
    EXEC SQL OPEN SSS_CURSOR END-EXEC.
    DISPLAY "Available records:".
    PERFORM C110-DISPLAY-RECORDS UNTIL SQLCODE = 1403.
    EXEC SQL CLOSE SSS_CURSOR END-EXEC.
    C100-EXIT.
    EXIT.
    C110-DISPLAY-RECORDS SECTION.
    *********************************************************************
    * C110-DISPLAY-RECORDS
    * Fetch the next record from the cursor and display it.
    *********************************************************************
    C110-DSPLY.
    EXEC SQL FETCH SSS_CURSOR INTO :SSS END-EXEC.
    IF SQLCODE = 0 THEN
    DISPLAY SSS.
    C110-EXIT.
    EXIT.
    C200-GET-RECORD SECTION.
    *******************************************************************
    * C200-GET-RECORD
    * Allocates the global clob LICENSE-TXT then selects
    * the name and text which corresponds to the client-supplied
    * sss. It then calls Z200-PRINTCRIME to print the information and
    * frees the clob.
    *******************************************************************
    C200-GTRECRD.
    PERFORM Z100-GET-SSS.
    IF (SSSEXISTS = 1)
    EXEC SQL ALLOCATE :LICENSE-TXT END-EXEC
    EXEC SQL SELECT NAME, TXT_SUMMARY
    INTO :NAME1, :LICENSE-TXT FROM LICENSE_TABLE
    WHERE SSS = :SSS END-EXEC
    DISPLAY "==================================================
    - "========================"
    DISPLAY " "
    DISPLAY "NAME: ", NAME1-ARR, "SSS: ", SSS
    DISPLAY " "
    PERFORM Z200-PRINTCRIME
    DISPLAY " "
    DISPLAY "==================================================
    - "========================"
    EXEC SQL FREE :LICENSE-TXT END-EXEC
    ELSE
    DISPLAY "SSS Number Not Found".
    C200-EXIT.
    EXIT.
    C310-GETNEWCRIME SECTION.
    *******************************************************************
    * C310-GETNEWCRIME
    * Provides a list of the possible crimes to the user and
    * stores the user's correct response in the variable
    * NEWCRIME.
    *******************************************************************
    C310-GTNWCRM.
    EXEC SQL WHENEVER SQLERROR CONTINUE END-EXEC.
    DISPLAY " ".
    DISPLAY "Select from the following:".
    PERFORM C311-DISPLAY-CRIME
    VARYING CRIME-INDEX FROM 1 BY 1
    UNTIL CRIME-INDEX > 5.
    MOVE ZERO TO CHOICE.
    PERFORM Z300-ACCEPT-CHOICE UNTIL CHOICE < 6
    AND CHOICE > 0.
    MOVE CRIME(CHOICE) TO NEWCRIME-ARR.
    MOVE 35 TO NEWCRIME-LEN.
    MOVE ZERO TO CHOICE.
    C310-EXIT.
    EXIT.
    C311-DISPLAY-CRIME SECTION.
    *******************************************************************
    * C311-DISPLAY-CRIME
    * Display an element of the crime table
    *******************************************************************
    C311-DSPLYCRM.
    DISPLAY "(", CRIME-INDEX, ") ", CRIME(CRIME-INDEX).
    C311-EXIT.
    EXIT.
    C320-APPENDTOCLOB SECTION.
    *******************************************************************
    * C320-APPENDTOCLOB
    * Obtains the length of the global clob LICENSE-TXT and
    * uses that in the LOB WRITE statement to append the NEWCRIME
    * character buffer to the global clob LICENSE-TXT.
    * The name corresponding the global SSS is then selected
    * and displayed to the screen along with value of LICENSE-TXT.
    * The caller to this function must allocate, select and later
    * free the global clob LICENSE-TXT.
    *******************************************************************
    C320-PPNDTCLB.
    EXEC SQL
    WHENEVER SQLERROR DO PERFORM Z900-SQLERROR
    END-EXEC.
    EXEC SQL LOB DESCRIBE :LICENSE-TXT GET LENGTH
    INTO :TXT-LEN END-EXEC.
    MOVE NEWCRIME-LEN TO CRIME-LEN.
    LOB Sample Program: LOBDEMO1.PCO
    13-26 Pro*COBOL Programmer’s Guide
    IF (TXT-LEN NOT = 0)
    ADD 3 TO TXT-LEN
    ELSE
    ADD 1 TO TXT-LEN.
    EXEC SQL LOB WRITE :CRIME-LEN FROM :NEWCRIME
    INTO :LICENSE-TXT AT :TXT-LEN END-EXEC.
    EXEC SQL SELECT NAME INTO :NAME1 FROM LICENSE_TABLE
    WHERE SSS = :SSS END-EXEC.
    DISPLAY " ".
    DISPLAY "NAME: ", NAME1-ARR, "SSS: ", SSS.
    DISPLAY " ".
    PERFORM Z200-PRINTCRIME.
    DISPLAY " ".
    C320-EXIT.
    EXIT.
    C300-ADD-CRIME SECTION.
    *******************************************************************
    * ADD-CRIME
    * Obtains a sss and crime from the user and appends
    * the crime to the list of crimes of the corresponding sss.
    *******************************************************************
    C300-DDCRM.
    EXEC SQL
    WHENEVER SQLERROR DO PERFORM Z900-SQLERROR
    END-EXEC.
    PERFORM Z100-GET-SSS.
    IF (SSSEXISTS = 1)
    EXEC SQL ALLOCATE :LICENSE-TXT END-EXEC
    PERFORM C310-GETNEWCRIME
    EXEC SQL SELECT TXT_SUMMARY INTO :LICENSE-TXT
    FROM LICENSE_TABLE WHERE SSS = :SSS
    FOR UPDATE END-EXEC
    PERFORM C320-APPENDTOCLOB
    EXEC SQL FREE :LICENSE-TXT END-EXEC
    ELSE
    DISPLAY "SSS Number Not Found".
    C300-EXIT.
    EXIT.
    C400-NEW-RECORD SECTION.
    *******************************************************************
    * C400-NEW-RECORD
    * Obtains the sss and name of a new record and inserts them
    * along with an empty_clob() for the clob in the table.
    *******************************************************************
    C400-NWRCRD.
    PERFORM Z100-GET-SSS.
    IF (SSSEXISTS = 1)
    DISPLAY "Record with that sss number already exists"
    ELSE
    DISPLAY "Name? " WITH NO ADVANCING
    ACCEPT NEWNAME
    DISPLAY " ".
    EXEC SQL ALLOCATE :LICENSE-TXT END-EXEC
    EXEC SQL INSERT INTO LICENSE_TABLE
    VALUES (:SSS, :NEWNAME, EMPTY_CLOB()) END-EXEC
    EXEC SQL SELECT TXT_SUMMARY INTO :LICENSE-TXT
    FROM LICENSE_TABLE WHERE SSS = :SSS END-EXEC
    DISPLAY "==================================================
    - "========================"
    DISPLAY "NAME: ", NEWNAME,"SSS: ", SSS
    PERFORM Z200-PRINTCRIME
    DISPLAY "==================================================
    - "========================"
    EXEC SQL FREE :LICENSE-TXT END-EXEC.
    C400-EXIT.
    EXIT.
    D000-LOGOFF SECTION.
    *******************************************************************
    * D000-LOGOFF
    * Commit the work done to the database and log off
    *******************************************************************
    D000-LGFF.
    EXEC SQL COMMIT WORK RELEASE END-EXEC.
    DISPLAY " ".
    DISPLAY "HAVE A GOOD DAY!".
    DISPLAY " ".
    D000-EXIT.
    STOP RUN.
    Z100-GET-SSS SECTION.
    *******************************************************************
    * Z100-GET-SSS
    * Fills the global variable SSS with the client-supplied sss.
    * Sets the global variable SSSEXISTS to 0 if the sss does not
    * correspond to any entry in the database, else sets it to 1.
    *******************************************************************
    Z100-GTSSS.
    DISPLAY "Social Security Number? " WITH NO ADVANCING.
    ACCEPT SSS.
    DISPLAY " ".
    EXEC SQL SELECT COUNT(*) INTO :SSSCOUNT FROM LICENSE_TABLE
    WHERE SSS = :SSS END-EXEC.
    IF (SSSCOUNT = 0)
    MOVE 0 TO SSSEXISTS
    ELSE
    MOVE 1 TO SSSEXISTS.
    Z100-EXIT.
    EXIT.
    Z200-PRINTCRIME SECTION.
    *******************************************************************
    * Z200-PRINTCRIME
    * Obtains the length of the global clob LICENSE-TXT and
    * uses that in the LOB READ statement to read the clob
    * into a character buffer to display the contents of the clob.
    * The caller to this function must allocate, select and later
    * free the global clob LICENSE-TXT.
    *******************************************************************
    Z200-PRNTCRM.
    DISPLAY "=====================".
    DISPLAY " CRIME SHEET SUMMARY ".
    DISPLAY "=====================".
    LOB Sample Program: LOBDEMO1.PCO
    13-28 Pro*COBOL Programmer’s Guide
    MOVE SPACE TO THE-STRING-ARR.
    EXEC SQL LOB DESCRIBE :LICENSE-TXT GET LENGTH
    INTO :TXT-LENGTH END-EXEC.
    IF (TXT-LENGTH = 0)
    DISPLAY "Record is clean"
    ELSE
    EXEC SQL LOB READ :TXT-LENGTH FROM :LICENSE-TXT
    INTO :THE-STRING END-EXEC
    DISPLAY THE-STRING-ARR.
    Z200-EXIT.
    EXIT.
    Z300-
    Vincent Rogier.

    Rubrique ORACLE : Accueil - Forum - Tutoriels - FAQ - Livres - Blog

    Vous voulez contribuer à la rubrique Oracle ? Contactez la rubrique !

    OCILIB (C Driver for Oracle)

    Librairie C Open Source multi-plateformes pour accéder et manipuler des bases de données Oracle

  3. #3
    Candidat au Club
    Inscrit en
    Avril 2007
    Messages
    2
    Détails du profil
    Informations forums :
    Inscription : Avril 2007
    Messages : 2
    Par défaut
    Vicenzo,

    je te remercie pour la recherche mais j'avais déjà lu ce programme de démo qui concerne un champ de type CLOB.
    La déclaration de type SQL-BLOB a été correctement faite. Par contre quand je veux récupérer le contenu du BLOB avec l'ordre suivant :
    EXEC SQL LOB READ :longueur from :blob into :buffer END-EXEC.

    le pré-compilateur me jette sur la définition de la Host Variable "buffer".
    La zone "blob" est typée avec SQL-BLOB (entre les ordres BEGIN / END DECLARE SECTION) et fait partie de la définition de ma table.
    Le problème se situe sur la définition de la zone "buffer".



    Pour un champ de type CLOB je peux mettre
    EXEC SQL BEGIN DECLARE SECTION END-EXEC.
    01 buffer picture(1000000) varying.
    EXEC SQL END DECLARE SECTION END-EXEC.

    Le pré-compilateur comprend cela comme un type Oracle externe VARCHAR et la correspondance s'effectue correctement.
    ==> Voici le cobol natif avant pré-compilation
    EXEC SQL BEGIN DECLARE SECTION END-EXEC.
    ...
    01 DA1Q.
    10 DA1Q-A0460 PICTURE X(8).
    10 DA1Q-J8840 PICTURE S9(3)
    COMPUTATIONAL-3.
    10 DA1Q-J8841B PICTURE X(50).
    10 DA1Q-B4396 PICTURE X(04).
    10 DA1Q-B4397 PICTURE S9(02)
    COMPUTATIONAL-3.
    10 DA1Q-A0965 PICTURE S9(1)
    COMPUTATIONAL-3.
    10 DA1Q-J8881 SQL-CLOB.
    ...
    EXEC SQL END DECLARE SECTION END-EXEC.
    ...

    EXEC SQL BEGIN DECLARE SECTION END-EXEC.
    01 94XA-J8881-LONG PICTURE S9(9) COMP.
    01 94XA-J8881 PICTURE X(10000000) VARYING.
    EXEC SQL END DECLARE SECTION END-EXEC.
    ...
    PROCEDURE DIVISION USING HD05.
    ...

    EXEC SQL LOB READ
    :94XA-J8881-LONG
    FROM A1Q-J8881
    INTO :94XA-J8881 END-EXEC.

    ==> Voici le cobol après la pré-compilation par PRO*COBOL
    ...
    01 DA1Q.
    10 DA1Q-A0460 PICTURE X(8).
    10 DA1Q-J8840 PICTURE S9(3)
    COMPUTATIONAL-3.
    10 DA1Q-J8841B PICTURE X(50).
    10 DA1Q-B4396 PICTURE X(04).
    10 DA1Q-B4397 PICTURE S9(02)
    COMPUTATIONAL-3.
    10 DA1Q-A0965 PICTURE S9(1)
    COMPUTATIONAL-3.
    * 10 DA1Q-J8881 SQL-CLOB.
    10 DA1Q-J8881 PIC S9(9) COMP-5.

    ...
    01 94XA-J8881-LONG PICTURE S9(9)
    * COMP
    COMP-5.
    *01 94XA-J8881 PICTURE X(10000000) VARYING.
    01 94XA-J8881.
    02 94XA-J8881-LEN PIC S9(4) COMP-5.
    02 94XA-J8881-ARR PIC X(10000000).
    ...


    Par contre quand je définis ma zone DA1Q-J8881 avec SQL-BLOB alors je ne sais pas quoi écrire pour la zone 94XA-J8881 qui me sert de buffer pour réceptionner la lecture du BLOB. C'est ici que le pre-compilateur me jette.


    Cordialement.

  4. #4
    Rédacteur
    Avatar de Vincent Rogier
    Profil pro
    Inscrit en
    Juillet 2007
    Messages
    2 373
    Détails du profil
    Informations personnelles :
    Âge : 47
    Localisation : France

    Informations forums :
    Inscription : Juillet 2007
    Messages : 2 373
    Par défaut
    Et en déclarant ta variable en PIC X([taille]). ?
    Vincent Rogier.

    Rubrique ORACLE : Accueil - Forum - Tutoriels - FAQ - Livres - Blog

    Vous voulez contribuer à la rubrique Oracle ? Contactez la rubrique !

    OCILIB (C Driver for Oracle)

    Librairie C Open Source multi-plateformes pour accéder et manipuler des bases de données Oracle

Discussions similaires

  1. Pro*COBOL + erreur connexion
    Par nddvlp dans le forum Interfaces de programmation
    Réponses: 0
    Dernier message: 17/04/2014, 14h41
  2. [11gR2] OpenCobol to Pro*Cobol - AUTO_CONNECT under Linux 64bits
    Par keskidi dans le forum Connexions aux bases de données
    Réponses: 3
    Dernier message: 14/03/2014, 13h33
  3. [PRO*COBOL] Appel SQL dans un programme COBOL
    Par JauB dans le forum Interfaces de programmation
    Réponses: 9
    Dernier message: 19/05/2010, 13h33
  4. [PRO*COBOL] Erreur oracle 1841
    Par copecoy dans le forum Interfaces de programmation
    Réponses: 1
    Dernier message: 03/12/2007, 19h12

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