I copied an empty VSAM into another VSAM file using file manager.
When I try to open the first file using file manager, the file opens and the message " Input data set empty" is displayed.
But when I try to open the file that has been copied , I am not able to open the file and I get a message "Data set empty" using file manager. When I try to initialize it in the batch process, then to the file does'nt open and the job aends with user abend 4049.
Can anyone please suggest why this is happening and what can be done to rectify it ?
When VSAM files are empty and we try to open it, it gives an error VSAM 160 error code. If opened without any tool like print ids (/) ch and when tried with any tool like file manager or file-aid it displays empty dataset.
Please open the i/p file in edit mode using FM and insert any dummy rec and then copy it to the O/P VSAM file.
You can also do the initialization using REPRO to avoid the error.
Joined: 06 Jun 2008 Posts: 8212 Location: Dubuque, Iowa, USA
Your first file has had at least one record inserted and then deleted. This initializes the file and allows it to be opened. Since you did not do that for your second file, you get the error message. You do not say what your batch process is, but you will need to open the second file file for OUTPUT (NOT I-O or INPUT), write a record to the file, and then it will open. You can delete the record from the file if you want, but until something has been written to the VSAM file, it cannot be opened.