Reading and updating record sequentially - INVREQ



Support for CICS/ESA, CICS/TS & Transaction Gateway, CICS Configuration Manager and CICS Performance Analyzer

Reading and updating record sequentially - INVREQ

Postby bryan_lab » Tue Nov 18, 2008 6:48 am

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.
bryan_lab
 
Posts: 3
Joined: Tue Nov 18, 2008 6:37 am
Has thanked: 1 time
Been thanked: 0 time

Re: Reading and updating record sequentially - INVREQ

 

Re: Reading and updating record sequentially - INVREQ

Postby dick scherrer » Tue Nov 18, 2008 8:29 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6308
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 90 times

Re: Reading and updating record sequentially - INVREQ

Postby Rainer Lechtenberger » Sat Apr 18, 2009 8:59 pm

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.
Rainer Lechtenberger
 
Posts: 2
Joined: Mon Apr 06, 2009 3:25 pm
Has thanked: 0 time
Been thanked: 0 time


Return to CICS

 


  • Related topics
    Replies
    Views
    Last post