Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Need suggestion on CICS READ UPDATE

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
subratarec

Active User


Joined: 22 Dec 2007
Posts: 110
Location: Bangalore

PostPosted: Fri May 03, 2019 2:23 pm    Post subject: Need suggestion on CICS READ UPDATE
Reply with quote

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

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2309
Location: NY,USA

PostPosted: Sat May 04, 2019 12:35 am    Post subject:
Reply with quote

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

Active User


Joined: 22 Dec 2007
Posts: 110
Location: Bangalore

PostPosted: Sat May 04, 2019 10:09 pm    Post subject:
Reply with quote

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

Senior Member


Joined: 21 Sep 2010
Posts: 2309
Location: NY,USA

PostPosted: Tue May 07, 2019 7:52 pm    Post subject:
Reply with quote

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

Active User


Joined: 22 Dec 2007
Posts: 110
Location: Bangalore

PostPosted: Fri May 10, 2019 9:01 am    Post subject:
Reply with quote

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

Senior Member


Joined: 21 Sep 2010
Posts: 2309
Location: NY,USA

PostPosted: Thu May 16, 2019 9:24 am    Post subject:
Reply with quote

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

Active User


Joined: 22 Dec 2007
Posts: 110
Location: Bangalore

PostPosted: Fri May 17, 2019 10:42 am    Post subject:
Reply with quote

Hi Rohit,

Yep thats what I thought but Thanks! for reconfirming the same.
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10637
Location: italy

PostPosted: Fri May 17, 2019 12:50 pm    Post subject: Reply to: Need suggestion on CICS READ UPDATE
Reply with quote

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

Senior Member


Joined: 21 Sep 2010
Posts: 2309
Location: NY,USA

PostPosted: Tue May 21, 2019 12:20 am    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts HANDLE AD2R CICS ABEND Nileshkul CICS 3 Sat Dec 07, 2019 12:11 am
No new posts Cics storage violation Venkata Ramayya CICS 10 Thu Nov 07, 2019 12:45 am
No new posts CICS Web Services configuration question SickPup404 CICS 28 Mon Nov 04, 2019 9:56 pm
No new posts KSDS direct READ clause after READ NEXT sophia.lee JCL & VSAM 0 Tue Oct 01, 2019 10:10 am
This topic is locked: you cannot edit posts or make replies. ASSIST/GT with CICS BPranav CICS 1 Mon Sep 16, 2019 9:26 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us