Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Suggestion on KSDS VSAM READ in CICS

 
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: 104
Location: Bangalore

PostPosted: Wed Feb 13, 2019 4:42 pm    Post subject: Suggestion on KSDS VSAM READ in CICS
Reply with quote

Hi,

I have one clarification on COBOL+CICS read to KSDS VSAM file. Below is the explanation.

1. We have a situation where we will do a sequential read on a KSDS VSAM by using STARTBR in Program A
2. Then flow will hit READ NEXT to get the first rec with UNCOMITTED
3. Once read successful then retrieved data program will process
4. Now LINK to Program B from Program A with the data we retrieved
5. In Program B we will check and gather some more details
6. Corntrol comes back to Program A and filling with updated details
7. Then we used another READ with RIDFLD (for key search in VSAM) with UPDATE
8. Then once we get the needed rec we tried REWRITE with the updated value.

Till point 6 it is ok but the moment it hit point 7, program is abend - APCY. We thought that using UNCOMITTED key word will help us (as it allows simultaneous update) on this but it did not.

It's a Non RLS VSAM. Anyway we changed the logic a bit and have achieved whatever we wanted. But it still leaves a question why is it abending with APCY. Now what I can think of is - As we already have one read pointer on the same file (with the STARTBR and READ NEXT) so CICS will not allow the second read pointer (READ with UPDATE) on the same file and thats the reason it is failing.

Is my understanding correct ? Not sure if the above write up enough to explain the situation.

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

Rohit Umarjikar

Senior Member


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

PostPosted: Wed Feb 13, 2019 11:47 pm    Post subject:
Reply with quote

Did anyone care to check the RESP code for point#7 ? Btw For Non-RLS UNCOMITTED is defaulted and not necessarily need any mention.
Back to top
View user's profile Send private message
subratarec

Active User


Joined: 22 Dec 2007
Posts: 104
Location: Bangalore

PostPosted: Thu Feb 14, 2019 12:44 am    Post subject:
Reply with quote

Hi Rohit,

Thanks for your reply. Actually the moment it reaches to point 7 the screen hold for few seconds and then CICS abend. I will try to see if we can see the RESP value.
But in general do you think that because 2 reads in same transaction and that is only causing issue?

Thanks
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


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

PostPosted: Thu Feb 14, 2019 3:10 am    Post subject:
Reply with quote

Without knowing RESP or RESP2 , how do you know what to fix? If I were you I would first debug to know the cause and then find the solution.

Second, I would follow this logic STARTBR , READNEXT and then call program B then do a ENDBR by saving the key. For next update part , do a RESETBR/STARTBR with earlier saved key to position it back with different browse characteristics and do subsequent REWRITE.

But either case please get to the bottom of the problem to know the fix.
Back to top
View user's profile Send private message
subratarec

Active User


Joined: 22 Dec 2007
Posts: 104
Location: Bangalore

PostPosted: Thu Feb 14, 2019 12:40 pm    Post subject:
Reply with quote

Hi Rohit,

The logic you have mentioned below we had adopted the same type of logic to achieve our result.

But I just wanted to know why the other way didn't work. As far as the RESP is concerned we tried with both with DEBUG (we use online INTERTEST tool) and with out that. In both the cases when the flow hit point 7 it just abended with APCY. I checking if I can display the current RESP value so I can see that in CEEMSG.

May be CICS won't allow 2 reads on the same file in the same transaction.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


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

PostPosted: Thu Feb 14, 2019 1:03 pm    Post subject:
Reply with quote

You had a UNCOMMITTED STARTBR characteristic in point 1 and in point 7!you changed to UPDATE within the same STARTBR and that’s mostly the reason why it happened and as explained you need RESETBR or ENDBR to change the BROWSE characteristics to another one ( in this case UPDATE).
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 How to delete a VSAM dataset from ins... Mike.Fulton JCL & VSAM 6 Fri Feb 15, 2019 5:58 am
No new posts Convert CICS Modules to AMODE ANY CICSWOLF PL/I & Assembler 6 Fri Feb 08, 2019 7:10 pm
No new posts How to specify TCBLIMIT for DB2CONN i... Mike.Fulton CICS 3 Thu Feb 07, 2019 1:27 am
No new posts CKTI not started in CICS 5.4 danik56 CICS 9 Thu Jan 31, 2019 12:13 pm
This topic is locked: you cannot edit posts or make replies. How to verify Retention of a Vsam dat... upendrasri JCL & VSAM 4 Sat Jan 26, 2019 5:18 pm

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