View previous topic :: View next topic
|
Author |
Message |
garv_fundu Warnings : 1 New User
Joined: 02 Nov 2006 Posts: 22
|
|
|
|
Suppose A is the root segment
B and C are the child segments of A
D is the child seg of B
E is the child seg of C
If currently we are at position B and we place a Call GN A
what will be the result? |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi there,
we will get next segment of A means if we have two occurance of A say for key a1,a2 & we are at the child of a1 which is b1(segment b) then if we issue GN a we will get a2.
Hope it is clear |
|
Back to top |
|
|
garv_fundu Warnings : 1 New User
Joined: 02 Nov 2006 Posts: 22
|
|
|
|
guptae wrote: |
Hi there,
we will get next segment of A means if we have two occurance of A say for key a1,a2 & we are at the child of a1 which is b1(segment b) then if we issue GN a we will get a2.
Hope it is clear |
and what if there is no other occurance of A... where will the pointer be nw... still at B1 or somewhere else?
Also if we give a GHU call next then what will happen?
Please clear the doubt... |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi there,
if we have structure like that
a1,a2 r two occurance of A, b1, b2 are child of a1 if r pointer is on b1 if we give GN A it will fetch b2
a1 is occurance of A, b1,is child of a1 if r pointer is on b1 if we give GN A it will give end of database
GHU: will get hold the segment & establish the parentage |
|
Back to top |
|
|
rahul_kolhe
New User
Joined: 08 Nov 2006 Posts: 15
|
|
|
|
please explain in detail : a1,a2 r two occurance of A, b1, b2 are child of a1 if r pointer is on b1 if we give GN A it will fetch b2
I tried your first answer and it was right : [we will get next segment of A means if we have two occurance of A say for key a1,a2 & we are at the child of a1 which is b1(segment b) then if we issue GN a we will get a2.
]
[/quote] |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi Rahul,
What u want to know exactly? |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
Guptae: I think Rahul is confirming your answer
For Rahul:
A GN call acts dependent on the SSA. If none is supplied it reads and returns the database sequentially in hierarchy: top-down-left-right. If qualified it will still read identically but return only the segments that meet the qualification. Each successfull GN-call establishes position.
GHU locks the segment for a subsequent delete or update. GHU also returns the first segment to meet the qualification and normally finds its way via the index. GHN returns and locks the next segment to meet the qualification.
Via Google one can find some more basics.
This one seems all right. |
|
Back to top |
|
|
rahul_kolhe
New User
Joined: 08 Nov 2006 Posts: 15
|
|
|
|
Thank you George,
The link is very useful and answer was perfect and what I wanted.
Since I was facing issue where my GN call was looping and never returning GE statcode(may be looking for whole DB), Use of GNP solved it but still I was confused. Above answer cleared all doubts.
Thank you again.
Rahul |
|
Back to top |
|
|
garv_fundu Warnings : 1 New User
Joined: 02 Nov 2006 Posts: 22
|
|
|
|
hi guptae,
reg ur post:
a1 is occurance of A, b1,is child of a1 if r pointer is on b1 if we give GN A it will give end of database
GHU: will get hold the segment & establish the parentage
if after we get end of database, immediately we give a GHU call for the segment A, what will be the result? |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
garv_fundu wrote: |
hi guptae,
reg ur post:
a1 is occurance of A, b1,is child of a1 if r pointer is on b1 if we give GN A it will give end of database
GHU: will get hold the segment & establish the parentage
if after we get end of database, immediately we give a GHU call for the segment A, what will be the result? |
Please have a look at my prior post where this question is explained; or start a new topic please |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
gav_fundu please read my prior post. |
|
Back to top |
|
|
|