Set up a user library instead and then data will go there instead of the 'work' library.
It will allow you to work with larger data sets.
libname user '/folders/myfolders/temp/';
5 million records shouldn't be problematic for storage unless you have a smaller machine.
Unfortunately to reset this error, I've found you need to reinstall SAS, but I recommend restarting your VM first and see if it clears.