如何解决读取VSAM文件时的INVEREQ错误?

huangapple go评论65阅读模式
英文:

how to solve INVEREQ error in reading a vsam file?

问题

我想使用CICS命令读取VSAM文件中的所有记录。但不幸的是,我遇到了错误号16或INVREQ,意思是'INVREQ - 读操作不允许,因为在FCT中没有提到。记录被锁定',但我不知道如何解决这个问题。在使用READNEXT函数之前,我尝试了使用STARTBR,但返回了相同的错误。这是我尝试的STARTBR代码。

EXEC CICS STARTBR
   FILE('file-name')
   RIDFLD(data-area) 
   KEYLENGTH(data-value)
   REQID(data-value)
   SYSID(system-name)
   GTEQ
END-EXEC
英文:

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

答案1

得分: 1

CSD 中如何定义文件?文件定义中有定义文件是否可浏览的属性。或许值得查询该文件并检查其定义。

英文:

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

答案2

得分: 1

文件必须在CICS中定义。在文件定义中(当您使用CEDA DEFINE FILE时),有一个操作部分,您可以在其中设置对文件允许的选项,如添加、浏览、读取、更新等。您需要正确设置这些选项。

英文:

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.

huangapple
  • 本文由 发表于 2023年6月15日 13:55:17
  • 转载请务必保留本文链接:https://go.coder-hub.com/76479483.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定