Reputation: 29
How can I read from a VSAM file continuously? I have a VSAM file contining some records. I need to read records one by using CICS commands, but I dont know where the file ends.Is there any way to signal that the file has reached the end to stop the reading process.
I tried ´EXEC CICS READNEXT
Upvotes: 0
Views: 541
Reputation: 455
@Soraya, there are several reasons why you might receive an error response of 16 (INVREQ). If you specify RESP2(field-name) in your STARTBR command, you will receive a value indicating the reason for the INVREQ response. If you do not code the RESP2 operand on your STARTBR command, you can also access this RESP2 value in the EIBRESP2 field.
Upvotes: 0
Reputation: 31
You browse through a file using STARTBR followed by multiple READNEXT commands and then an ENDBR command. You repeat the READNEXT command to read all the records in the file and when the end of the file is reached the READNEXT command fails with an ENDFILE response. You then issue end ENDBR.
Upvotes: 1