Here are examples to use RIDFLD in CICS for Reading, writing the VSAM files
RIDFLD During RERD With UPDATE
First step is you need to read a record from file with UPDATE option. Else, CICS treats it as READ only.
Example Code:
EXEC CICS READ FILE(FILEA) INTO(Record1) RIDFLD(Key1) UPDATE END-EXEC
RIDFLD During REWRITE
You need to use REWRITE options to UPDATE VSAM files.
Example Code:
EXEC CICS REWRITE FILE(FILEA) FROM(Record1) RIDFLD(Key1) END-EXEC
Purpose of RIDFLD in CICS
- RIDFLD should be given while reading a VSAM record for update
- RIDFLD may be a Key or RBN or RRN
- For RBN, the RIDFLD should be greater than or equal to zero
- For RRN, the RIDFLD should be greater than or equal to 1
- For RBN, the RIDFLD should be fullword bynary
Keep Reading






