MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to Display RID

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
Wayne S.
Beginner


Joined: 09 Jan 2003
Posts: 1
Topics: 1
Location: Waco, Texas

PostPosted: Mon Jul 12, 2004 12:34 pm    Post subject: How to Display RID Reply with quote

In an SQL error -803 using DSNTIAR, it returns this statement:
Code:
-803 AN INSERTED OR UPDATED VALUE IS INVALID BECAUSE THE
     INDEX IN INDEX SPACE indexspace-name CONSTRAINS COLUMNS
     OF THE TABLE SO NO TWO ROWS CAN CONTAIN DUPLICATE
     VALUES IN THOSE COLUMNS. RID OF EXISTING ROW IS '003254F'.


The question is:
I understand that DB2 assigns the RID and it is displayed in HEX and my table does not have a rowid in it's DCLGEN. So, how do I go about displaying the DB2-assigned RID of the "existing" row. We use BMC software here if I can use it. Can I access it via SQL? Any suggestions?
Thank you for your time.
Wayne
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Jul 12, 2004 2:26 pm    Post subject: Reply with quote

Wayne,

A row of data in a table is stored as a record and is identified by a unique record identifier (RID). RIDs are stored in index page set data pages and identify the records that are stored in file page set data pages.

For a table space defined as LARGE or with the DSSIZE parameter, a RID is a 5-byte field, containing a 4-byte page number followed by a 1-byte page ID map entry number.

For any other table space type, a RID is a 4-byte field, containing a 3-byte page number followed by a 1-byte page ID map entry number.


If you loaded the rows using a load utility then you can use LOCATE RID DUMP to dump the records in question.

Check this link for a detailed explanation of Locating rows by key

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNUGH10/2.22.2.4.5?SHELF=&DT=20010216104113&CASE=

But if you are inserting rows via program , you can add a display of the PRIMARY key whenever you encounter a -803.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
CZerfas
Intermediate


Joined: 31 Jan 2003
Posts: 211
Topics: 8

PostPosted: Tue Jul 20, 2004 6:49 am    Post subject: Reply with quote

Hello Wayne,

having BMC-Tools at hand, you have another choice. In the "Catalog Manager" of BMC there is a line command HEX. After issuing this command on table level you can give a locate- resp. find-command with a RID as input.
The only drawback: Youre userid has to have control access on the underlying VSAM dataset of that table.

regards
Christian
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group