From: michael.bierenfeld on
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 WHERE. 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
From: Frank Swarbrick on
You might want to post this also to comp.databases.ibm-db2.

n 1/31/2008 at 2:11 AM, in message
<e0cad07e-60c6-40b8-a918-ca3f2f846292(a)d21g2000prf.googlegroups.com>,
michael.bierenfeld(a)web.de<michael.bierenfeld(a)web.de> wrote:
> 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 WHERE. 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