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

Regarding GN call


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

New User


Joined: 02 Nov 2006
Posts: 22

PostPosted: Fri Nov 10, 2006 4:09 pm
Reply with quote

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
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Fri Nov 10, 2006 10:38 pm
Reply with quote

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
View user's profile Send private message
garv_fundu
Warnings : 1

New User


Joined: 02 Nov 2006
Posts: 22

PostPosted: Sun Nov 12, 2006 11:42 am
Reply with quote

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
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Sun Nov 12, 2006 9:35 pm
Reply with quote

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
View user's profile Send private message
rahul_kolhe

New User


Joined: 08 Nov 2006
Posts: 15

PostPosted: Sun Nov 12, 2006 10:07 pm
Reply with quote

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
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Mon Nov 13, 2006 9:55 am
Reply with quote

Hi Rahul,

What u want to know exactly?
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Mon Nov 13, 2006 8:07 pm
Reply with quote

Guptae: I think Rahul is confirming your answer icon_wink.gif

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
View user's profile Send private message
rahul_kolhe

New User


Joined: 08 Nov 2006
Posts: 15

PostPosted: Tue Nov 14, 2006 2:23 am
Reply with quote

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
View user's profile Send private message
garv_fundu
Warnings : 1

New User


Joined: 02 Nov 2006
Posts: 22

PostPosted: Tue Nov 14, 2006 2:28 pm
Reply with quote

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
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Tue Nov 14, 2006 3:35 pm
Reply with quote

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 icon_wink.gif
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Tue Nov 14, 2006 3:45 pm
Reply with quote

gav_fundu please read my prior post.
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 Error while running web tool kit REXX... CLIST & REXX 5
No new posts Call program, directly from panel CLIST & REXX 9
No new posts Batch call online program, EXCI task ... CICS 3
No new posts CSQBGET - Call giving completion code... COBOL Programming 3
No new posts CICS DPL call CICS 6
Search our Forums:

Back to Top