'Parentage' in IMS Database.

RDBMS from IBM and IBM's Hierarchical DBMS and Transaction Manager (IMS DC).
Post Reply
Munish Sharma
New Member
Posts: 5
Joined: Wed Aug 20, 2014 11:31 am

'Parentage' in IMS Database.

Post by Munish Sharma »

Hi,

Many a times I've seen my Team lead making use of the phrases like 'setting up' the parentage in IMS database. What exactly does it mean? And why do we need to set-up the parentage, what happens if it is not set-up, can someone please guide me.
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: 'Parentage' in IMS Database.

Post by Anuj Dhawan »

The search for the requested segment is limited to the dependents of the lowest-level segment most recently accessed by a GU or GN call. Parentage determines the end of the search and is in effect only following a successful GU or GN call.

You can set parentage in two ways:
  1. By issuing a successful GU or GN call. When you issue a successful GU or GN call, IMS sets parentage at the lowest-level segment returned by the call. Issuing another GU or GN call (but against a different PCB) does not affect the parentage that you set using the first PCB in the previous call. An unsuccessful GU or GN call cancels parentage.
  2. By using the P command code with a GU, GN, or GNP call, you can set parentage at any level.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: 'Parentage' in IMS Database.

Post by Anuj Dhawan »

Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: 'Parentage' in IMS Database.

Post by Robert Sample »

IMS, unlike DB2 and most recent databases, is hierarchical and not relational. A hierarchical database has a root node and every data group attaches at a lower level (possibly several levels down depending upon the definition of the database). The parent is the data group at the next higher level (hence the ultimate parent is the root node).
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM DB2 and IMS DB/DC”