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
 

 

Regarding GN call

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
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    Post subject: Regarding GN call
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: 1187
Location: Bangalore,India

PostPosted: Fri Nov 10, 2006 10:38 pm    Post subject:
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    Post subject:
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: 1187
Location: Bangalore,India

PostPosted: Sun Nov 12, 2006 9:35 pm    Post subject:
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    Post subject:
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: 1187
Location: Bangalore,India

PostPosted: Mon Nov 13, 2006 9:55 am    Post subject:
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: 1105
Location: The Netherlands at Hole 19

PostPosted: Mon Nov 13, 2006 8:07 pm    Post subject:
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    Post subject:
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    Post subject:
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: 1105
Location: The Netherlands at Hole 19

PostPosted: Tue Nov 14, 2006 3:35 pm    Post subject:
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: 1105
Location: The Netherlands at Hole 19

PostPosted: Tue Nov 14, 2006 3:45 pm    Post subject:
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    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 Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts Need help in triggering a PL1 module ... Varungv99 IMS DB/DC 0 Fri Apr 07, 2017 10:01 am
No new posts Cobol EZASOKET call to SETSOCKOPT fails Andi1982 COBOL Programming 6 Thu Oct 06, 2016 7:12 pm
No new posts Strange EXEC function call in z/VM Willy Jensen CLIST & REXX 3 Wed Oct 05, 2016 2:07 pm
No new posts COBOL DB2 - CALL statement - high CPU... TS70363 DB2 15 Sun Sep 11, 2016 6:07 am


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