PDA

View Full Version : Closing a Database File in CL



David Abramowitz
01-01-1995, 02:00 AM
On Wednesday, March 03, 1999, 09:08 AM, scott bernard wrote: I am reading in a database file in CL using RCVF. Normally in CL, I process until end of file. In this scenerio, I want to stop reading the file, delete it and end the program. I am receiving an error when I try to delete the file, while it has not been processed to EOF. The file appears to be open and thus cannot be deleted. All documentation that I have found indicates that the file will not be closed until EOF or the job ends. Can I close and delete a DB file in the same CL as the RCVF. Any suggestions would be appreciated. Thanks, Scott <hr>Have you tried the CL "CLOF" command? David Abramowitz

Guest.Visitor
03-04-1999, 11:30 AM
You could force EOF by sharing a previous OPNDBF's OPNID, and then in order each of POSDBF *END, RCVF, and CLOF. But most typically what you want requires simply adding before the DLTF, the request to: RCLRSC LVL(*CALLER) OPTION(*NORMAL) Regards, Chuck Comments provided "as is" with no warranties of any kind whatsoever.