View previous topic :: View next topic
|
Author |
Message |
Suthagar
New User
Joined: 01 Jul 2005 Posts: 26 Location: Chennai
|
|
|
|
Hi,
Could anyone explain me about the GNP call with the unqualified SSA?
Regards,
Suthagar.S |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Gnp: Get next with in parent
Suppose my structure is
Policy basic segment is root & it have child like Policy detail segment & Policy occassional segment .
Now your pointer is on policy basic segment (pbtseg) whose key means policy number = rat1000 you want to access all the child policy detail segment(pdtlseg) of this one.
In working storage
01 ssa-pdtlseg-unqualified.
03 ssa-segment-name pic x(8) value 'pdtlseg'.
03 ssa-command-code pic x(4) value spaces.
03 filler pic x(1) value ' '.
You can make a call
Call 'CBLTDLI' function-GNP,
PCB-MASK,
IO-AREA,
ssa-pdtlseg-unqualified. |
|
Back to top |
|
|
Suthagar
New User
Joined: 01 Jul 2005 Posts: 26 Location: Chennai
|
|
|
|
Thanks for your immediate response Gupta.
I would like to know more abot GNP call actually.
For the base segment I had gone with the GN call and for the first child segment if I go with the GNP call with the unqualified SSA means how it will retrieve the data.
Anyone can help me out in this regard.
Regards,
Suthagar. S |
|
Back to top |
|
|
gowtham_1982 Warnings : 1 Active User
Joined: 02 Dec 2005 Posts: 109
|
|
|
|
Suthagar wrote: |
Thanks for your immediate response Gupta.
I would like to know more abot GNP call actually.
For the base segment I had gone with the GN call and for the first child segment if I go with the GNP call with the unqualified SSA means how it will retrieve the data.
Anyone can help me out in this regard.
Regards,
Suthagar. S |
Hi suthagar,
IMS basically travels in TOP - DOWN and LEFT - RIGHT format. Hence, IMS will fetch all the occurence of the child Policy detail segment and fetches all the occurences of Policy detail segment.
Hope this clarifies the query.
Corrections welcomed....
Gowtham |
|
Back to top |
|
|
subramaniabharathi
New User
Joined: 09 Mar 2006 Posts: 9
|
|
|
|
I would like to add what suthagar said
IMS basically travels in TOP - DOWN and LEFT - RIGHT format. Hence, IMS will fetch all the occurence of the child Policy detail segment and fetches all the occurences of Policy detail segment.
If you fetch the root and then give an GNP it will traverse in the above order.
But If you dont like to traverse to other immediate parent segments and you want to retreive the segements directly which is the next parent level to the root.
You could give a GNP with the required segment in the unqualified segment this will fetch the segment directly without traversing.
Remember one thing Using unqualified root you cannot specify or get the correct occurance.You will get all the occurance.As there is no such keying facility in unqualified ssa
correct me if i am wrong
Thanks
subramaniabharathi |
|
Back to top |
|
|
komalnik
New User
Joined: 28 May 2005 Posts: 7
|
|
|
|
Hi,
The acronym for GNP is Get next within Parent. This is usually issued with an unqualified ssa. The main reason being before issuing this we will set the Parentage by issuing either a "GN" or else an "GU" Call. Then after setting the Parentage We will issue GNP with Unqualified so that it will fetch all occurences within that Parent Only.
Now let me take a Scenario
The root being a Policy Segment and am setting the Parentage on a Particular Occurence and then I will issue a GNP Saying get me all the Occurences under this. |
|
Back to top |
|
|
|