Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Inserting duplicate segment into IMS DB

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
View previous topic :: :: View next topic  
Author Message
Ambili S

Active User


Joined: 06 Sep 2007
Posts: 112
Location: India

PostPosted: Thu Feb 03, 2011 11:44 am    Post subject: Inserting duplicate segment into IMS DB
Reply with quote

Hi

Can a duplicate segment be inserted in an IMS db. Suppose the root segment in R. The child segments of R are C1 and C2.
Child segments of C1 are D11 and D12. Is it possible to insert another child D13 which would be a duplicate of D12 ?
Back to top
View user's profile Send private message

Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Feb 03, 2011 7:59 pm    Post subject:
Reply with quote

Not under the same parent. It would get a status code II indicating that it is a duplicate.
Back to top
View user's profile Send private message
lonewolf133

New User


Joined: 24 Nov 2007
Posts: 3
Location: Bangalore

PostPosted: Tue Feb 08, 2011 3:52 pm    Post subject:
Reply with quote

Hi

That would depend on how the key/field is defined. Decode the DBD,

if you find

FIELD NAME=(FLDNAME,SEQ,U)

The U would mean that the key/field is unique and you cannot insert a duplicate segment.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Mon Feb 21, 2011 12:13 am    Post subject:
Reply with quote

IMS databases are arranged in http://en.wikipedia.org/wiki/Hierarchy as opposed to relational in DB2.

May I suggest that you study the concepts? Imagine that - wikipedia teaches IMS!
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Mon Feb 21, 2011 12:23 am    Post subject:
Reply with quote

Here's something additional. If I can locate this stuff, so can you.

http://my.safaribooksonline.com/book/databases/ims/0131856715/overview-of-the-ims-hierarchical-database-model/ch07lev1sec1#X2ludGVybmFsX0ZsYXNoUmVhZGVyP3htbGlkPTAxMzE4NTY3MTUvMjI=
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Feb 21, 2011 12:29 am    Post subject: Reply to: Inserting duplicate segment into IMS DB
Reply with quote

Hi Sandy,

Quote:
If I can locate this stuff, so can you.

Yup, but you are willing to look for it. . . icon_wink.gif

Many aren't. . .

d
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Mon Feb 21, 2011 12:57 am    Post subject:
Reply with quote

That's how I learned IMS all of those years ago. I was willing to WORK at it. icon_biggrin.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm
No new posts Sort Card to Remove Duplicate records... raj4neo SYNCSORT 2 Wed Jan 25, 2017 4:44 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts how to find the duplicate list RAVIGUPTA1990 DB2 6 Wed Mar 30, 2016 12:11 am
No new posts Query related to inserting an auto po... Gopalakrishnan V DB2 4 Fri Dec 18, 2015 12:09 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us