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

READ with Update Option for 5 times in a single transaction


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
paduchuri

New User


Joined: 03 Jan 2011
Posts: 32
Location: Hyderabad

PostPosted: Wed Nov 28, 2012 1:17 am
Reply with quote

HI

I am trying to update a Vsam file using read update for 5 times in a program.

steps

Read the vsam file using key with update
move the new values
rewrite the record with new values
unlock the file

The above process is working fine for one record its not working from second

please advise me if i can update the same vsam file in a single program more than once.if no please could you provide me the code using read next with update and token or any other

its urgent......... Thanks in advance
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Nov 28, 2012 1:28 am
Reply with quote

Hello,

Unfortunately, we don't do urgent. . . .

What indication do you have that there is a problem. Telling us it "is not working" is a complete waste of time and if you are looking for an answer quickly, you need to provide something for us to work with . . .
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Wed Nov 28, 2012 1:43 am
Reply with quote

Considering you are using THREE commands in CICS for your loop, and every command in CICS returns a response code indicating whether it worked or not, the least you could do is tell us which of the three commands failed and what response code was received, right? Unless you want us to make random guesses?
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed Nov 28, 2012 2:21 am
Reply with quote

Just as Robert said unless provide details of RESP and RESP2 after each step no one would be able to help

Experts here help in their free time its highly annoying thing when people expect to reply to post with urgency without providing any details that would help anyone to think about

Being in forum for couple of years you atleast try adhering to rules
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed Nov 28, 2012 2:29 am
Reply with quote

When dealing with File-API failures, it's always a good idea to capture the EIBRCODE as well, because imbedded within it, you'll find the VSAM Return-Code (R15) and Error-Code.
Back to top
View user's profile Send private message
Peter cobolskolan

Active User


Joined: 06 Feb 2012
Posts: 104
Location: Sweden

PostPosted: Wed Nov 28, 2012 8:27 pm
Reply with quote

Q: Why unlock after rewrite?
The idea with the Unlock command is to release the held lock when you decide NOT to Rewrite. After rewrite the lock is held until syncpoint, which normally is end-of-task.
In your scenario there is no need to unlock and is illogic.
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 -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts SCOPE PENDING option -check data DB2 2
No new posts Random read in ESDS file by using RBA JCL & VSAM 6
No new posts OUTFIL with SAVE option DFSORT/ICETOOL 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
Search our Forums:

Back to Top