Page 1 of 1

Reading and updating record sequentially - INVREQ

PostPosted: Tue Nov 18, 2008 6:48 am
by bryan_lab
Hi,

Can someone help me with this? This is my first time to do a CICS program and I'm having a problem updating the record sequentially.

These are what I have done with my program:

1. Issue a start browse to start from the first record.
2. Perform read next until end of file.
2.a. Update that record using the rewrite.

My problem is when I'm updating the record that I have read, I'm encountering an INVREQ. I don't know what to do with this.

I'll appreciate if someone can help me with this.

Thanks.

Re: Reading and updating record sequentially - INVREQ

PostPosted: Tue Nov 18, 2008 8:29 am
by dick scherrer
Hello,

What is the value of resp2?

Have you verified that you have actually read a record? Was the status checked after the read?

Have you issued a read for update or did you simply read the file?

Is this a variable or fixed length file?

It is typically not acceptable to process an entire vsam file in an online program. Whole file processing is better served in batch.

Re: Reading and updating record sequentially - INVREQ

PostPosted: Sat Apr 18, 2009 8:59 pm
by Rainer Lechtenberger
Hello,

it is not possible to do an update while in browsing. You have to end the browsing first:

1. Issue a start browse to start from the first record.
2. Perform read next until end of file and remember last record's key.
3. Issue an end browse.
4. Read record with option 'update' using the key remembered.
5. Update that record using the rewrite.

I guess, you are processing a key-organized file, like VSAM. In that case, there are simpler ways to get direct access to the last record.