该帮助的版本不再更新,请参见https://www.jmp.com/support/help/zh-cn/15.2 获取最新的版本.


First, use the Meta Connect() command to connect to a SAS metadata server:
connected = Meta Connect( "MyMetadataServer", port );
If you supply only the machine name (for example, myserver.mycompany.com) and the port, you are prompted to provide the authentication domain, your user name, and your password. You can also specify all that in JSL:
connected = Meta Connect( "MyMetadataServer", port, "authdomain", "user name", "password" );
When you are finished using the SAS metadata server, use Meta Disconnect( ) to disconnect the connection. No arguments are necessary; the command closes the current metadata server connection.
Now you can send Disconnect and Connect messages to the conn object to close and open the SAS connection.
This is an example of using an object and messages with SAS server connections. You might have also connected to SAS servers using global functions. If so, the Disconnect and Connect messages do not affect those global connections. However, if there is no active global connection, that global connection is set to the connection opened by the object.
When you connect to a SAS server, use Connect Libraries to automatically connect metadata-defined libraries.
To connect specific libraries later, use the SAS Connect Libref function or Connect Libref message to a SAS server object.
After you connect to a SAS server, use the Get Lib Ref() command to view the libraries on that server:
Get Log() returns the contents, which can be placed in a JSL variable and used like any JSL string.