Soraya
Soraya

Reputation: 29

how to solve INVEREQ error in reading a vsam file?

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

Upvotes: 0

Views: 309

Answers (2)

John Tilling
John Tilling

Reputation: 31

The file has to be defined to CICS. On the file definition (when you use CEDA DEFINE FILE) there is an operations section where you set what options are allowed against the file ie add, browse, read, update etc. You need to have these set correctly.

Upvotes: 1

Will Yates
Will Yates

Reputation: 131

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

Upvotes: 1

Related Questions