I want to read all records in a VSAM file using CICS commands. But unfortunately, I encountered error number16 or INVREQ which means ´INVREQ – Read operation not permitted as it is not mentioned in the FCT. Record is locked´ but I dont know how to solve this problem. Before using READNEXT function I used STARTBR which returns the same error. This is the code that I tried for STARTBR.
EXEC CICS STARTBR
FILE('file-name')
RIDFLD(data-area)
KEYLENGTH(data-value)
REQID(data-value)
SYSID(system-name)
GTEQ
END-EXEC
How is the file defined within the CSD? There are attributes within the file definition that define if the file can be browsed or not. Might be worth inquiring on the file and checking its definition