You can end your SAS session using several methods , including
selecting Close from the control menu of the main SAS window
selecting Cancel in the Status window. This window appears when you are running in batch mode.
double-clicking on the control menu of the main SAS window, or clicking on the X in the upper-right corner of the main SAS window
issuing the BYE or ENDSAS command from a SAS command line
submitting an ENDSAS statement
closing the SAS session from the Task List by selecting the session process (the process name differs depending on how you started SAS) and selecting End Task
selecting Exit SAS from the File pull-down menu in the main SAS window menu bar
selecting Exit from the File pop-up menu
pressing the ALT+F4 accelerator-key combination that is defined by Windows.
If SAS terminates with errors the SAS log might contain error messages that explain the failure. Any error message that SAS issues before the SAS log is initialized are written to the MSG window if it is available or to the SAS console log, which is a Windows file. Under Windows NT, the SAS console log is located in the c:\winnt\Profiles\ username \Application Data folder. In all other Windows operating systems, the SAS console log is located in the c:\Document and Settings\ userid \Application Data folder. You can obtain the filename for the SAS console log from the Application Event Log. To open the application Event Log, submit eventvwr from the Run dialog box and click Application .