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
 

 

retrieval of parent and child segment

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

New User


Joined: 28 Jun 2005
Posts: 12

PostPosted: Wed Jun 29, 2005 3:48 pm    Post subject: retrieval of parent and child segment
Reply with quote

hai,

how can we retrieve both parent(seg20a) and the child(seg20g) segment using ssa.I don't know how to give the call.please help me.
Back to top
View user's profile Send private message

somasundaran_k

Active User


Joined: 03 Jun 2003
Posts: 134

PostPosted: Thu Jun 30, 2005 2:47 am    Post subject:
Reply with quote

If it's a qualified SSA move the search/key values to the parent and child. Then issue a call ..Something like

CALL 'CBLTDLI' USING GU
YOUR PCB
YOUR SEGMENT
PARENT SSA
CHILD SSA.

hth
-Som
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Thu Jun 30, 2005 4:31 pm    Post subject: Re: retrieval of parent and child segment
Reply with quote

There can be more than one child for a parent....

First you give a GU Call for Parent, If you have values specified for the Key of Parent Segment.

If Parent Found for that key value....Give a GNP Call on Child Seg, until End Of DB.

Corrections are wel come.

Regards,

Priyesh.
Back to top
View user's profile Send private message
somasundaran_k

Active User


Joined: 03 Jun 2003
Posts: 134

PostPosted: Thu Jun 30, 2005 7:22 pm    Post subject:
Reply with quote

Priyesh

Quote:

I don't know how to give the call.please help


What I had given is a sample/general CALL statement. The process you mentioned is correct but the original poster didn't mention that the parent segment is the root segment. So this parent can be a child of another parent, then the process also has to be modified accordingly. In other terms it's all depend on the DB schema.

Regds
-Som
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Thu Jun 30, 2005 7:28 pm    Post subject: Re: retrieval of parent and child segment
Reply with quote

Hi Som,

Quote:
So this parent can be a child of another parent, then the process also has to be modified accordingly


You are correct....It depends exactly whats the structure.

I just replied considering it as Root segment as in notations it is mentioned like seg20a & seg20g. Well, it may be other way too.

I m agree with you.

Regards,

Priyesh.
Back to top
View user's profile Send private message
Suthagar

New User


Joined: 01 Jul 2005
Posts: 26
Location: Chennai

PostPosted: Fri Jul 01, 2005 12:00 pm    Post subject: Re: retrieval of parent and child segment
Reply with quote

Hi,
I just wanted to know, can we able to pass a single qualified SSA to retrieve the both parent and the child by using the concatenated key(provided those are unique keys).

I think we can do that.

Please correct me if I am wrong/Right also.

Thanks,
Suthagar.S
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Fri Jul 01, 2005 3:48 pm    Post subject: Re: retrieval of parent and child segment
Reply with quote

Hi Suthagar,

I think We can.....Yes.

Regards,

Priyesh.
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 IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm
No new posts Summing up child-values in self-refer... Auryn DB2 1 Sun Feb 14, 2016 6:02 pm
No new posts Cobol - DB2 row retrieval. Chetan Kumar DB2 6 Fri Oct 16, 2015 10:44 am
No new posts Endevor Move retrieval vinodhk CA Products 2 Thu Oct 02, 2014 6:48 pm
No new posts Deleting and Inserting an IMS Segment... mohammad amir ashraff IMS DB/DC 8 Thu Jun 06, 2013 3:03 pm


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