IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

dclgen values for sqlcode 100


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
abhijit.nayak01

Active User


Joined: 22 Mar 2009
Posts: 161
Location: South Africa

PostPosted: Mon Aug 02, 2010 10:35 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Aug 02, 2010 11:24 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts Generate output lines (SYSIN card for... DFSORT/ICETOOL 4
Search our Forums:

Back to Top