When I tried to back up of dataset, I've got the error as below. Source dataset is SQL table registered in SAS. I tried multiple times, but I keep getting this error. Any help?
28 data Backup.NON_LIFE_OCT_; 29 set ifrs.NON_LIFE_OCT; 30 run; NOTE: There were 4241191 observations read from the data set IFRS.NON_LIFE_OCT. NOTE: The data set BACKUP.NON_LIFE_OCT_ has 4241191 observations and 37 variables. NOTE: Compressing data set BACKUP.NON_LIFE_OCT_ decreased size by 89.79 percent. Compressed is 10075 pages; un-compressed would require 98633 pages. ERROR: An I/O error has occurred on file BACKUP.NON_LIFE_OCT_.DATA.
Where does library BACKUP point to? is it a local filesystem, a network share, or another DBMS library?
Network share
The fact that the ERROR happens after the file has been completely written (otherwise you couldn't get the compression summary) lets me suspect that it happens either when an old file is removed or when the file is renamed from non_life_oct_.sas7bdat.lck to non_life_oct.sas7bdat.
Look if a file called non_life_oct.sas7bdat is already there, and look out especially for spelling (part of it might be spelled uppercase). Have your IT people check if a special permission prevents deletion of files on the network share.
SAS should be able to create the back up, but if SAS cannot, then you could create the back up using file system commands outside SAS (or via SYSTASK from within SAS). If you are in Windows, you can use Robocopy or xcopy. If you are in Unix/Linux, you can use the cp command. SAS should work, but if not, then these copy command can be a work-around.
Jim
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.