View previous topic :: View next topic
|
Author |
Message |
abhijit.nayak01
Active User
Joined: 22 Mar 2009 Posts: 161 Location: South Africa
|
|
|
|
Hi,
I have a DB2 COBOL program. I have executed a query and fetched all values of table in DCLGEN. Now in the same program, I executed another query for the same table but it gave SQLCODE +100.
Question: What will teh values of the DCLGEN field. I have not initiaized the DCLGEN before executing 2nd query. Will it have the values of the old query or it will have spaces ? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
assume you mean that you are using the cobol structure defined by the copybook created by the dclgen process as sql host variables.
db2 will populate host variables
that are defined in the sql as part of the SELECT INTO clause
only when column values have been retrieved.
the contents of your host variables after an sql (select?) with an sqlcode = 0
will not be changed. |
|
Back to top |
|
|
|