SAS 9.1.3 Integration Technologies » Developer's Guide


Developing Windows Clients
Client Requirements
Client Installation
Security
Selecting a Windows Programming Language
Programming with Visual Basic
Programming in the .NET Environment
Using VBScript
Programming with Visual C++
Using the Object Manager
Creating an Object
Object Manager Interfaces
Using a Metadata Server with the Object Manager
Metadata Configuration Files
Error Reporting
Code Samples
Using Connection Pooling
Choosing Integration Technologies or COM+ Pooling
Using Integration Technologies Pooling
Using Com+ Pooling
Pooling Samples
Using the IOM Data Provider
Using the Workspace Manager
Class Documentation
Windows Clients

Using a Metadata Server with the SAS Object Manager

If you are using a metadata server, the first step in developing and running a client program is to make sure you have access to a properly configured server.

After the IOM server has been configured, you can begin developing a Windows client for the server.

Connecting to Metadata

Before you can use server metadata, you must first connect to a metadata server using metadata configuration files.

If you created your configuration files using the ITConfig utility, the SAS Object Manager will connect to the metadata server automatically when you call a method or interface that requires metadata.

If your configuration files are not in the default location and the location is not stored in the Windows registry, you must specify the location using the SetMetadataFile method. The SetMetadataFile method has three parameters: the full path to the system configuration file, the full path to the user configuration file (optional), and a flag that indicates whether to store the file path values in the registry.

Note: An application should call the SetMetadataFile method one time only. To create a new metadata server connection, use the CreateOMRConnection method.

Metadata Caching

When a metadata server connection is established, the metadata is read from the server and stored by the SAS Object Manager in a cache. The cached metadata is used when you call CreateObjectByLogicalName, ServerDefs, or LoginDefs.

You can use the SetRepository method to refresh the metadata from the current metadata repository or read metadata from a new repository. For details about the SetRepository method, see the SAS Object Manager reference documentation (sasoman.chm).

For multi-threaded applications, using the metadata cache in the SAS Object Manager causes performance issues. The CreateObjectByOMR method enables you to read metadata from the server without caching the metadata.

Object Definitions

There are three definitions that are useful for defining IOM objects. These definitions can be created either in the source code or on the metadata server:

Server definition (ServerDef)
A server definition must be created before an IOM server can be launched using the SAS Object Manager. The server definition can either be loaded from a metadata server or created dynamically. The server definition is independent of the user. Server definitions include a Logical Name attribute.

Login definition (LoginDef)
A login definition contains user-specific information, including user name, password, and domain. Login definitions are a convenience and are not required for creating a connection to an IOM server. They provide a mechanism for storing persistent definitions of user names and passwords.

LoginDefs also allow multiple definitions for the same user on different security domains. For example, you could use one user name and password on z/OS and a different one for UNIX. This is also possible without the use of a login definition, but the user will need to enter the user name and password each time a server is launched.

Logical name definition (LogicalNameDef)
For the SAS Metadata Server, this corresponds to a logical server name on the SAS Metadata Server.

For LDAP, the logical name definition allows a description to be associated with each logical name used in a server definition. Logical name definitions are not used to launch a server. However, a logical name is required to launch a server when using the login definition.

For each type of definition, there is a container interface that enables you to manage the definitions. For example, ServerDef objects are managed using the ServerDefs interface. You can retrieve definitions by name using the Item method. For LDAP, you can store new definitions on the metadata server using the Add method.

Security Considerations

  • The user ID that is used to log on to SAS will be determined when the object is launched. After the object is launched, the user ID cannot be changed.

  • The information in a file is only restricted by the permissions on the file. If you are concerned about security, you might not want to use files to store LoginDefs.

  • Administrators of metadata servers should configure the directory such that the right to read each LoginDef is restricted to the owner of the LoginDef. Granting access to a LoginDef allows a user to start SAS and log on as the user defined in the LoginDef. It also allows the user to view the password.