Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot find row on Table

Status
Not open for further replies.

db2dude

Programmer
Aug 17, 2000
1
0
0
US
When I do a select using the primary key on a DB2 table it says it cannot find the row. However, when I use an online application like QMF or Info-reports the row is out there. This happens randomly and not for a particular row/key. My program (COBOL) doesn't do any updates, deletes or inserts. Just a select. Please Help!!!
 
Are you running the same exact query in both QMF and in your program ?
Sometimes, when you are selecting only some of the column values in your query
then the result will be different from when you select *. [sig][/sig]
 
Make sure that your program has been given access authority by the DBA. Cut and paste your QMF query that works into your COBOL program. Make sure that you have working storage fields defined (DCLGEN) for the table.
 
db2dude,

I had the same problem and found out that the value of certain rows were in different case (upper or lower) than my query. In QMF, the default setting is to change all lower case to uppercase before submitting the query. So while your query in QMF may seem to be identical to COBOL, they may not be due to the automatic conversion of uppercase.
 
Hi Db2dude --
u r getting SQL code +100 only..right??? or anything else?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top