I tried to read a vsam file with a specified key in PL/1, it is all right whether it could find the one. However, when I make the vsam blank, then the program will get abended with 'ONCODE=82', just like below, but I didn't find nothing correlated between them. Hope anyone could help me.
The UNDEFINEDFILE condition was raised because the data set was never loaded
Joined: 06 Jun 2008 Posts: 8151 Location: East Dubuque, Illinois, USA
You are aware that copying an empty file to a VSAM data set does not empty it (unlike sequential files), right? You are also aware that attempting to read a VSAM file that has never had a record written to it will cause you problems, right?
You absolutely must load the VSAM file with a record after defining it before attempting to read it. You can delete that record after the write, but you cannot skip the write.
All this has been discussed many times on this forum.