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

Difference between GHN and GHU


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

New User


Joined: 04 Aug 2009
Posts: 10
Location: Hyderabad

PostPosted: Thu Jul 22, 2010 4:56 pm
Reply with quote

Can anyone please help me that what is the basic difference between GHN and GHU in an IMS call.

Where the control goes when a GHN call returned with satuscode spaces?
Where the control goes when a GHU call returned with satuscode spaces?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Thu Jul 22, 2010 5:37 pm
Reply with quote

Well - they will do what the programmer will tell them to. GHN will get the next child under the same parent and GHU wil get the unique segment under the same-parent.
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Thu Jul 22, 2010 7:35 pm
Reply with quote

I think the above needs a correction:
Quote:
GHN will get the next child under the same parent and GHU wil get the unique segment under the same-parent.


GHN will retrieve next segment w.r.t current position in database and lock it (so not necessarily under same parent)

Similar for GHU.

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

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Thu Jul 22, 2010 7:36 pm
Reply with quote

and the difference b/w GHN and GHU is same as the basic difference b/w GN and GU.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Thu Jul 22, 2010 7:45 pm
Reply with quote

Well, mention about "parent" is stupid in my post icon_redface.gif - I'm not sure why did I mention it, at first place. (looks like I should visit my parents soon).

Quote:
GHN will retrieve next segment w.r.t current position in database and lock it
That's correct , actually, before your program can delete or replace a segment, it must retrieve the segment and indicate to IMS that it is going to change the segment in some way. The program does this by issuing a Get call with a "hold" before deleting or replacing the segment. When the program has successfully retrieved the segment with a Get Hold call, it can delete the segment or change one or more fields (except the key field) in the segment.

If you find out that you do not need to update it after issuing a Get Hold call, you can continue with other processing without releasing the segment. The segment is freed as soon as the current position changes when you issue another call to the same PCB that you used for the Get Hold call. In other words, a Get Hold call must precede a REPL or DLET call. However, issuing a Get Hold call does not require you to replace or delete the segment.
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts Difference between joblib and steplib JCL & VSAM 2
No new posts Pull data using date difference betwe... DB2 6
No new posts Difference between PLT txn and schedu... CICS 3
No new posts Timestamp difference and its average ... DB2 11
No new posts Difference when accessing dataset in ... JCL & VSAM 7
Search our Forums:


Back to Top