For Programmers: Free Programming Magazines  


Home > Archive > Cobol > January 2008 > db2 prep and nested exec sql









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author db2 prep and nested exec sql
michael.bierenfeld@web.de

2008-01-31, 3:55 am

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
Frank Swarbrick

2008-01-31, 6:56 pm

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@d21g2000prf.googlegroups.com>,
michael.bierenfeld@web.de<michael.bierenfeld@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

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com