I want to read a VSAM file record using CICS commands and then update it using REWITE command, but I have two major problems:
- throu readnext operation to access a vsam record, for some of the records, i need to access database and do some process there, finally commit database changes. But the thing is whenever I commit the database, the readnext encounters an error INVREC, which dosnt allow to access next records in VSAM file.
- When accessing any record in VSAM file, I need to update the record in file, so I used REWRITE CMMAND, which returns error number 16.
Overall I want to do the following process: 1.Read a VSAM file records one by one using READNEXT comand 2. Access database and do commit 3. Rewrite the VSAM file record using REWRITE command.
In your scenario you probably need to do the following: