Contents Developing Windows Clients  

Workspace Object

A SAS session.

Workspace Full Description

Attributes

LanguageService Property
DataService Property
FileService Property
Utilities Property
Name Property
UniqueIdentifier Property

Methods

Close Method
GetApplication Method
GetNewWorkspace Method

Description

A SAS Integrated Object Model (IOM) workspace represents a single session with the SAS System. The workspace provides the same set of resources and facilities as an interactive or batch SAS session.



Readonly Property LanguageService

Services for submitting SAS language statements to the workspace.

Type: LanguageService

Description

This property is the LanguageService for this Workspace. It enables you to submit SAS language and then examine the list and log.

Example

Usage


Readonly Property DataService

Services for reading and writing SAS libraries and relational data available to this Workspace.

Type: DataService

Description

This property is the DataService within this workspace. It provides the basis for accessing SAS data libraries and the many relational databases that are available through SAS/ACCESS products.

Example

Usage


Readonly Property FileService

An interface to manipulate external files and filerefs.

Type: FileService

Description

This property is the FileService for this workspace. The FileService object enables you to explore the file system and manipulate its files. If the Workspace is running a remote server, then files on that server are being accessed.

Example

Usage


Readonly Property Utilities

Controls various utility features within this workspace.

Type: Utilities

Description

This Utilities object provides access to various utility features within this SAS Workspace. The Utilities object provides services that control data formatting (formats/informats), SAS system options and result packages. An interface to the server host is also available.

Example

Usage


Property Name

A client-chosen workspace name.

Type: String

Description

You can set any name that you want on the Workspace. This may be helpful when you are managing multiple workspaces from within the same client program.

Default: "SAS Workspace"

Example

Usage


Readonly Property UniqueIdentifier

A UUID that can be used to uniquely identify this SAS workspace.

Type: String

Description

Each workspace has a universally unique identifier (UUID) that may be used to identify it unambiguously. This UUID is generated automatically for each new workspace.

This property supplies the UUID in string form.

Example

Usage


Method Close

Close a SAS workspace and exit

Description

This method ends the use of a workspace and frees any associated resources such as files or memory. This is equivalent to ENDSAS from the SAS command line.

You should close each workspace when you are finished with it.

Usage

Parameters: None

Example

' Create a workspace on the local system to begin a SAS Session
Dim obWSMgr As New SASWorkspaceManager.WorkspaceManager
Dim obWS As SAS.Workspace
Dim errString As String
Set obWS = obWSMgr.Workspaces.CreateWorkspaceByServer("My workspace", VisibilityNone, Nothing, "", "", errString)
' print the name and UUID
debug.print "Name: " & obWS.Name
debug.print "UUID: " & obWS.UniqueIdentifier
' close the workspace to end the SAS Session
obWS.Close

See Also


Method GetApplication

Returns the top-level object for the requested application.

Description

You can use this method to obtain SCL objects and objects for additional SAS products. The caller supplies a name to identify the desired application. This method returns a generic interface for the top-level object of the application.

Usage

Parameters

Name Direction Type Description
application  in  String  The application identifier string. For objects written in SCL, this is a class or application name. For other SAS applications, the name is provided in documentation.

For SCL, the name is either the name of the top-level application class or the name of an SCL program that loads and returns the top-level application class. In the latter case, the program could perform additional initialization before or after the class is loaded.

SCL class names must be fully qualified (i.e. "library.catalog.class"), but there is a default lookup for SCL applications. An applications can be located in "sasuser.iom" or "sashelp.iom" (in that order) if its name is not fully qualified. You should avoid using unqualified names which begin with "SAS", because these may conflict with applications provided by the Institute.  

Returns Object

A generic interface to the top-level object of the application.

Example

See Also


Method GetNewWorkspace

Returns a separate workspace within the same server.

Description

Creates an additional Workspace within the same server. Thus, the new workspace is on the same host and runs within the same operating system process or address space as the workspace used to call this method. This is equivalent to the STARTSAS command in interactive mode.

You must call Close separately on the original Workspace and on each new workspace that you create with this method.

Usage

Parameters: None

Returns Workspace

A new Workspace interface.

Example

See Also

Close

Contents Developing Windows Clients