Thread: CICS

DB2 COMMIT kills my VSAM browse - then REWRITE INVREQ

Started by Dave • user3 replies173 viewsLast activity 2 weeks ago
Post #1
0 votes
Dave
Reputation
356
Posts: 25
Joined: Jul 21, 2024, 2:55 PM
Posted: Jul 26, 2026, 9:12 AM

Pattern: READNEXT through VSAM, do some SQL, COMMIT, try to keep browsing and REWRITE the VSAM row.

After COMMIT the next READNEXT blows up. REWRITE also returns 16. Feels like I am fighting syncpoint rules.

Post #2
1 votes
James
Reputation
524
Posts: 30
Joined: May 2, 2024, 8:00 AM
Posted: Jul 26, 2026, 12:12 PM

You are. DB2 COMMIT issues a CICS syncpoint. Syncpoint ends the browse. You need a fresh STARTBR after COMMIT (usually from the key you saved).

REWRITE needs a prior READ/READNEXT with UPDATE. Plain browse READNEXT does not qualify. READNEXT UPDATE is an RLS thing. Typical pattern: browse, save key, COMMIT, READ UPDATE that key, REWRITE, STARTBR again, skip the row you just did if it comes back first.

Post #3
0 votes
Dave
Reputation
356
Posts: 25
Joined: Jul 21, 2024, 2:55 PM
Posted: Jul 27, 2026, 2:12 PM

Rewrote to that pattern. Painful but stable.

You must be signed in to reply to this thread