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

Clarification on GHU call


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

Active User


Joined: 17 Mar 2008
Posts: 148
Location: Anna NGR

PostPosted: Thu Aug 25, 2011 7:18 pm
Reply with quote

Hello,

I have a query on the control GHU is obtaining on the segment. If i have a program A and program B, where both accessing the same database. When program A access the database with a GHU call without a need to replace/delete the segment. At the same time if program B tries to access the same segment by issuing a GHU call. Both the PSB are having the procopt options as GOT.

What will happen?. Will it abend/both the program can issue GHU to a segment at the same time?
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Thu Aug 25, 2011 9:33 pm
Reply with quote

Since the procopt allowing only read access, both programs can read at the same time.

Even if program C has the segment held for an update, both A and B can read it.

If program C then later rolls back the update, A and B will NOT know it and will have the updated segment. (That's the "O").
Back to top
View user's profile Send private message
kratos86

Active User


Joined: 17 Mar 2008
Posts: 148
Location: Anna NGR

PostPosted: Fri Aug 26, 2011 8:14 am
Reply with quote

Thanks for the timely reply Ed.
Back to top
View user's profile Send private message
kratos86

Active User


Joined: 17 Mar 2008
Posts: 148
Location: Anna NGR

PostPosted: Fri Aug 26, 2011 3:23 pm
Reply with quote

I have one more question, If the procopt option of program A is A and it access the segment with a GHU call without the intention to update/delete. If the program B with procopt - GOT tries to access the same segment, will the call fail with GG return code.

I got a scenario where my job failed with GG return code and analysing the issue we got to know that a job with PROCOPT- A was accessing the same database with GHU calls without any replace/delete function.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Fri Aug 26, 2011 8:16 pm
Reply with quote

Yes...that will cause a GG.

Program A does a get-hold, then Program B tries to read. Since the procopt has the "T" in it, Program B tries a second time after some short interval. When the second call is denied, it gets a GG back from IMS.

The easy fix is to change program A to use GU instead of GHU. Another fix would be to have Program B try several times if it gets a GG.

It's weird to get what your getting though. If program A really hasn't updated anything, the hold should be released as soon as the next call moves off of that segment. I would normally expect an actual update to cause a GG, that's why we try and perform checkpoints frequently during update programs.

I guess I'm telling you that Program A may actually be updating the database, even if you've been told that it doesn't. Either that, or it's reading a segment and sitting on it for a long time.
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