View previous topic :: View next topic
|
Author |
Message |
subratarec
Active User
Joined: 22 Dec 2007 Posts: 126 Location: Bangalore
|
|
|
|
Hi,
Need one small suggestion on handling VSAM file in CICS region.
1. This is related to one KSDS VSAM (Non RLS) file allocated in CICS region.
2. While it is allocated to CICS region our one batch program wants to update rec (Shareoption 3 3)
3. Now to do that we are using EXCI and calling one online driver module (which dedicated to do such task, means read and then REWRITE)
4. Now while checking that online driver module I saw that there is READ with UPDATE but post REWRITE there is no UNLOCK. Here is my query. I don't know if I am right or wrong. What I know is if the REWRITE is successful then the file will automatically be unlocked but if the REWRITE fails then auto unlock will not happen and we should explicitly UNLOCK the file.
Is that idea right or wrong? What you guys suggest? We should use explicit unlock or not if rewrite fails?
Thanks |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Quote: |
but if the REWRITE fails then auto unlock will not happen and we should explicitly UNLOCK the file. |
Have you not seen any SYNCPOINT ROLLBACK? I haven't tested but that should take care of this problem unless you come and tell it don't. |
|
Back to top |
|
|
subratarec
Active User
Joined: 22 Dec 2007 Posts: 126 Location: Bangalore
|
|
|
|
Hi Rohit,
Thanks for your reply. During the analysis I can see that post rewrite operation flow is assigning the response code and doing RETURN (flow coming back to the calling batch program).
Now in this scenario I guess we are good right ? I mean we have RETURN in the online program that means online task is completed and hence anyway the VSAM resource will be free right? |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
I thought you were researching on REWRITE failed Condition. Even it has a RESP , what do you do if it fails ? Do you still RETURN? |
|
Back to top |
|
|
subratarec
Active User
Joined: 22 Dec 2007 Posts: 126 Location: Bangalore
|
|
|
|
Hi Rohit,
Actually the online REWRITE module is an old module which we are not changing but rather calling to get the service. I can see if REWRITE fail happens then it is just passing the RESP code indicating that REWRITE has been failed and then I can see there simple CICS RETURN, which I belive the flow is coming back to batch calling module.
Now in this scenario what I want to check is IF REWRITE fails and with just the response code RETURN happens then what will happen to the FILE? The FILE has been access with UPDATE, means it has been locked and what I know successful REWRITE automatically UNLOCK the file but if REWITE fails and then with RETURN means though the REWITE operation failed but because RETURN our transaction ends hence file will aotomatically been UNLOCKED. Is that concept correct?
Otherwise I will go back to the owner of that online module and may have to suggest an explicit UNLOCK when REWITE fail happens. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Yes when you did the RETURN without TRANSID it means the task is ended permanently which assumes the release of the resources. |
|
Back to top |
|
|
subratarec
Active User
Joined: 22 Dec 2007 Posts: 126 Location: Bangalore
|
|
|
|
Hi Rohit,
Yep thats what I thought but Thanks! for reconfirming the same. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
quoting the CICS manuals
Quote: |
RETURN returns control from an application program either to an application program at the next higher logical level, or to CICSĀ®. |
Quote: |
yes when you did the RETURN without TRANSID it means the task is ended permanently which assumes the release of the resources.
|
whenever control is returned to CICS the transaction ends permanently AMEN
any additional parameter passed along wit the RETURN call are irrelevant |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Quote: |
any additional parameter passed along wit the RETURN call are irrelevant |
No doubt , that's correct. But in the context of the scenario it wasn't relevant to have TRANSID passed when REWRITE failed. |
|
Back to top |
|
|
|