By default, the contents of each SAS Enhanced Editor window are saved in an autosave backup file of your SAS® program every 10 minutes. (You can manually change this time interval, as discussed in the Changing the Time Interval section of this SAS KB article.)
An example of the backup filename is shown here, where file-name is the name of the SAS program that is open in the editor. Note, too, that the string "9999AAAA-9BAA-BB9A-123A-888BDDDAAA" is just an example and is different for each file:
Important Note: The autosave backup files are deleted when the Enhanced Editor window that contains the SAS program code is closed or when you exit SAS normally. If SAS terminates abnormally, the backup autosave files might not be deleted.
The default location for the autosave backup files depends both on the release of SAS that is installed and on your specific Microsoft Windows operating system and the values for the %TEMP% and %APPDATA% environment variables.
One way to locate autosave files with the .$as extension is to search your entire C:\ drive, including searching hidden files and folders (see below), for files that start with AUTOSAVE of* or search for files with a .$as extension. Then, search any other drives specified by your %TEMP% and %APPDATA% environment variables for files that start with AUTOSAVE of* or for files with the .$as extension.
Note: To determine your %TEMP% location, in the Windows Search box, type %TEMP% and press the Enter key. A File Explorer window is opened to the TEMP location designated on your machine. To determine your %APPDATA% location, in the Windows Search box, type %APPDATA% and press the Enter key. A File Explorer window is opened to the APPDATA location designated on your machine.
Another way is to work with your organization's IT department. They might be able to use Microsoft Windows File Recovery App.
An additional way is to check the default folder location as described below.
In the following paths, user-ID is the Windows user name that is used to log on to the machine.
On Microsoft Windows operating systems, the autosave files use the APPDATA environment variable, and the folder is %APPDATA%\SAS\EnhancedEditor\. To view these files, in the Windows Search box, type %APPDATA% and press the Enter key. Then, in the File Explorer window that opens, navigate to \SAS\EnhancedEditor\ . A possible default location is:
C:\Users\user-ID\AppData\roaming\SAS\EnhancedEditor
Note: The AppData folder might be hidden. One method to see hidden folders is in File Explorer. Click the View tab and check the box for Hidden Items.
On Microsoft Windows XP and Windows 2003 Server operating systems, autosave files are in this default location:
C:\Documents and Settings\user-ID\Application Data\SAS\EnhancedEditor
Alternately, if SAS cannot access the location above, the autosave files are stored in the TEMP environment variable location. To view these files, in the Windows Search box, type %TEMP% and press the Enter key. The File Explorer window opens to the TEMP location designated on your machine. Examples for SAS 9.2, SAS 9.3, and SAS 9.4 are as follows:
To search hidden folders, do the following:
In the following, user-ID is the Windows user name that is used to log on to the machine.
On most Windows operating systems, the autosave files are in the following location:
C:\Documents and Settings\user-ID\Application Data\SAS\Enhanced Editor
On Microsoft Windows NT, the default location is as follows:
C:\winnt\profiles\user-ID\Application Data\SAS\Enhanced Editor
On Microsoft Vista or Windows Server 2008, the default location is a hidden folder:
C:\Users\user-ID\AppData\roaming\SAS\EnhancedEditor
To search hidden folders, click Advanced Search and select Include non-indexed, hidden, and system files.
If SAS cannot access the location, the autosave files are stored in a temporary location, as shown here for SAS 9.1:
C:\Documents and Settings\user-ID\Local Settings\Temp
In SAS 8, the Enhanced Editor autosave files are saved to the location that is defined by the Microsoft Windows TEMP environment variable.
Typically, for Windows XP, the location is as follows:
C:\Documents and Settings\user-ID\Local Settings\Temp
However, by default, this directory is hidden in a Windows 2000 system. To see all hidden files and folders, do the following:
To determine the TEMP location, see SAS Note 4816, "Enhanced Editor autosave feature creates a file: autosave of filename.$as."
To manually change the default 10-minute time interval, do the following:
You can also change the time interval by adding the WAUTOSAVE command to the sasv9.cfg file. Note: Discussions about the WAUTOSAVE command in online SAS® 9.1.3 documentation still refer to the TEMP autosave location.
SAS® Studio includes integration with Git, a system for tracking changes and managing version control among multiple users. Git can be used with many different repository hosting services such as GitHub and Bitbucket. Refer to Understanding Git Integration in SAS Studio 5.2.
You can also interact with a Git repository from SAS by using SAS Git functions in a SAS program. For more information, see Using Git Functions in SAS in SAS Functions and CALL Routines: Reference.