i have a file which is opened in online.when i am trying to read a record from that file through a batch program it gives read error even though that particulare record is present. the job abends for the same. and if you restart the job it works fine. this is a production job and keeps abending almost daily. can anyone help me to resolve this. the file is an IAM file.
Joined: 23 Nov 2005 Posts: 69 Location: Minneapolis, MN USA
My View regarding this abend is..
Program actually trying to access the File which is opened in CICS region. But abends since the file is opened in CICs region. In the abend step, they wud have asked the system to close the file in CICS region if the program terminated abruptly. So when U restart the job, it faces no problem.
What we follow in our project is, We do have steps in the JCL which close all the online file before executing a Program and Open again when the Execution of the program ends.
Hope the above information will be useful.. Please share ur opinion!!
thanks for the update. but this is not at all related to opening and closing of files. even if it is opened in CICS region we can read that file in batch. this is abending just because it failes to find out the particular record in that file and not because of file opened in CICS. the file is actually an IAM file and not VSAM