Exiting or Terminating Your SAS Session in the z/OS Environment

Preferred Methods for Exiting SAS

These are the preferred methods for exiting a SAS session:
  • select Filethen selectExit
  • use endsas;
  • enter BYE in the command line.

Additional Methods for Terminating SAS

In addition to the preferred methods for exiting a SAS session, when SAS is running on a server a system operator can terminate it in the following ways:
This method is the equivalent of an application requesting a normal shutdown. You should have no problems with your files.
The operating system initiates the termination of SAS, but application error handlers can still run and cleanup is possible. Your files will be closed, and the buffers will be flushed to disk. However, there is no way to ensure that the shutdown will always be orderly. Your files could be corrupted.
MEMTERM (also known as FORCE)
The operating system terminates all application processes with no recovery. This is the equivalent to what would happen if the system were rebooted.
Some databases, such as DB2, are able to recover from both the CANCEL and MEMTERM types of failures. These applications accomplish this task by logging every change so that, regardless of when a failure occurs, the log can be replayed to enable recovery to a valid state. However, some transactions could still be lost.
Although you can terminate SAS using these techniques, you should try one of the three preferred techniques listed first. For more information, see What If SAS Doesn't Start?.