db2 prep and exec sql include

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • michael.bierenfeld@web.de

    #1

    db2 prep and exec sql include

    Hello there,

    I have the following code snipplet

    EXEC SQL
    INCLUDE VMT002RS
    END-EXEC
    WHERE VMID = :HV-VMID AND
    TGNR = :HV-TGNR AND
    :HV-T-DATUM BETWEEN GDVON_D AND GDBIS_D
    END-EXEC.

    VMT002RS contains the select statement and the into clause like select
    bla from tablex info :hv-bla. This compiles fine if I use the MF/cob-
    compiler and the "included" interface to the db2 preprocessor. But
    when using the db2 prep standalone the generated cobol code is not ok.
    It still includes the complete SQL-Statemente.

    This means you cannot have SQL's in EXEC SQL INLCUDE FILES ?

    Can somebody help me out there. Maybe it
    is just a compiler switch but I cannot find it. I cannot change the
    source because nearly every programm uses this. Normally we use the
    MF-
    Compiler. But right now we have a database performance problem and I
    want to eliminate side effects.

    Thanks in advance.

    Michael
Working...