IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Qualified SSA for GNP


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
a_khedekar

New User


Joined: 21 Dec 2003
Posts: 7

PostPosted: Sat May 08, 2010 3:17 am
Reply with quote

Hi All,

Need a suggestion from performance point of view.

This is DB structure.
A (parent)
---> B (Child of A)
---> C (child of C1)

To load all into the a table, Code does the following:
1. GU A= A1, this returns value of key of B
2. To get to B, GNP where A= A1 and B= B1, retrieve B
3. To get to C, GNP where A= A1 and B = B1, retrieve C

I know that we do not require qualified call, as function of GNP is to retrieve the next segment within the set parent.
Does this cause any in-efficiency in the code ?

please let me know

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

Active Member


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

PostPosted: Sat May 08, 2010 5:38 pm
Reply with quote

Why use GNP? I do not like them - if you really need an explanation, I will provide one. It is much more efficient and easier to qualify your SSA structure down the chain.

Quote:
To load all into the a table, Code does the following:
1. GU A= A1, this returns value of key of B
2. To get to B, GNP where A= A1 and B= B1, retrieve B
3. To get to C, GNP where A= A1 and B = B1, retrieve C


Some is missing here. How can A return the key value of B? You need to also take into consideration that a child segment is a child segment because it is a 1 to many scenario. In other words - you will have 1 root - A - and a possibility of many B segments. Then under each B segment, you have a possibility of many C segments. What are you trying to accomplish?

1. GU A

2. To get to B - use qualified A SSA and unqualified B SSA and loop until GE or GB (don't need to check for GK, etc)

3. Once you have a good B segment returned you will have a C segment loop executed from your B segment loop - use qualified A SSA and qualified B SSA and unqualified C SSA loop until GE or GB (don't need to check for GK, etc)
Back to top
View user's profile Send private message
a_khedekar

New User


Joined: 21 Dec 2003
Posts: 7

PostPosted: Tue May 11, 2010 6:51 am
Reply with quote

I think i didnt use the terms correctly..

My whole question is all about the way you are retrieving all the segments. I want to know is it necessary to use qualified A SSA in step 2 and 3.
Is that performance effective ?

Once we setup parentage by GU A. All what we need it GNP unqualified B.
and GNP unqualified C within B.

I didnt get why are you saying "Why use GNP ?". What are you considering for unqualified B SSA in step 2 or unqualified C SSA in step 3 ? are you considering GN ?
In the end, all i have to do is retrieve all B, C in their hierarchical order for selected A for which key is known.

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

Active Member


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

PostPosted: Tue May 11, 2010 5:19 pm
Reply with quote

It takes much more to use GNP - way back in my early years of IMS, I did use GNP. From extensive experience, I found it better to qualify the parent segment and use unqualified for any child segments. Of course you would use GN. The example I gave is the easiest.
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Tue May 11, 2010 6:29 pm
Reply with quote

Hi Sandy,

Quote:
From extensive experience, I found it better to qualify the parent segment and use unqualified for any child segments. Of course you would use GN.


We would like to know if it is a performance issue or some overhead, because of which you do not prefer GNP. Can you throw some light on this please?

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

Active Member


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

PostPosted: Tue May 11, 2010 6:54 pm
Reply with quote

Use whatever you want.......if you already know the answers - don't ask!
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Wed May 12, 2010 12:26 pm
Reply with quote

Quote:
Use whatever you want.......if you already know the answers - don't ask!


This is so rude way to answer for such a polite request.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts Combination of qualified and unqualif... IMS DB/DC 2
No new posts SYNCSORT: To include qualified record... JCL & VSAM 16
No new posts What is diff b/w GN and GU calls in c... IMS DB/DC 5
No new posts Locator qualified reference is unknown PL/I & Assembler 3
No new posts GNP call with qualified SSA for Paren... IMS DB/DC 3
Search our Forums:

Back to Top