In SAS® Enterprise Guide® a submitted ENDSAS statement produces errors similar to "The connection to server . . . has been reset"


SAS code that is submitted from SAS Enterprise Guide might produce the following error messages:

Error: The connection to the server has been lost.
An error occurred executing the workspace job job-name.
The server is disconnected.
The connection to server server-name has been reset. Any jobs that were running or queued to be run have been discarded.
Object is not connected to server.
------------------------------ Technical Information Follows
[Interop.SAS]
Object is not connected to server
----------------------------------------------------
at SAS.LanguageServiceClass.FlushLog(Int32 NumCharsRequested)
at SAS.EG.JobManagement.WorkspaceJob.CheckForNewLog()
at SAS.EG.JobManagement.WorkspaceJob.RunJob(SasSession session)
at SAS.EG.JobManagement.SasJob.Run(SasSession session)
at SAS.EG.JobManagement.SasSession.RunJob(SasJob job)
at SAS.EG.JobManagement.WorkspaceSession.RunJob(SasJob job)
at SAS.EG.JobManagement.SasSession.SessionThread()Object is not connected to server
------------------------------ End of Technical Information

These errors are caused by the ENDSAS statement in your SAS program code.

The ENDSAS statement closes your SAS session. SAS Enterprise Guide is a thin client for SAS and will not process SAS code without a current connection to SAS.

To solve the problem, remove the ENDSAS statement from your SAS program code.