View previous topic :: View next topic
|
Author |
Message |
paduchuri
New User
Joined: 03 Jan 2011 Posts: 32 Location: Hyderabad
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
Peter cobolskolan
Active User
Joined: 06 Feb 2012 Posts: 104 Location: Sweden
|
|
|
|
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 |
|
|
|