使用 SAS IOM & 创建工作区会话VBA [英] Creating a workspace session using SAS IOM & VBA

查看:22
本文介绍了使用 SAS IOM & 创建工作区会话VBA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Excel VBA 连接到工作区服务器.使用本页,我制作了以下内容:

I am trying to connect to a workspace server using Excel VBA. Using the information on this page, I have produced the following:

Dim obSAS As SAS.Workspace
Dim obWorkspaceManager As New SASWorkspaceManager.WorkspaceManager
Private Sub Form_Load()
   Dim obConnection As New ADODB.Connection
   Dim obRecordSet As New ADODB.Recordset
   Dim obServerDef As New SASWorkspaceManager.ServerDef
   Dim xmlString As String
   obServerDef.Port = 28561
   obServerDef.Protocol = ProtocolBridge 
   obServerDef.MachineDNSName = "blah.server.com"
   Set obSAS = obWorkspaceManager.Workspaces.CreateWorkspaceByServer( "Ref", _
      VisibilityProcess, obServerDef, "me@saspw","MyPass", xmlStr)
end sub

我的第一反应是:

<xml id="combridgeOutput"><connectionAttempts><connectionAttempt>
  <sasserver></sasserver>
  <sasmachinednsname>blah.server.com</sasmachinednsname>
  <sasport>28561</sasport>
  <saslogin>me@saspw</saslogin>
  <status>0x80041001</status>
  <description><Exceptions><Exception>
  <SASMessage severity="Error">
    The client has connected to a SAS (9.2) Metadata Server (v1.0) when 
    it intended to connect to a SAS Workspace Server.
  </SASMessage>
  </Exception></Exceptions></description>
</connectionAttempt></connectionAttempts></xml>

所以我更新了端口号以指向工作区服务器,现在我得到了这个:

So I updated the port number to point at the workspace server, and now I get this:

  <same XML tags as above >
  <SASMessage severity="Error">
    Client me@saspw does not have permission to use server 
    SASMeta - Workspace Server (A5DPDN69.AV000069).
  </SASMessage>

不想为此练习设置特殊权限.如何将 VBA 连接到 SAS 工作区服务器会话?

Would rather not set special permissions for this exercise. How else can one connect VBA to a SAS workspace server session?

推荐答案

Doh!我使用了错误的机器名称.供参考,这里是获取正确机器名称的过程!

Doh! I was using the wrong machine name. For reference, here is the process for getting the correct machine name!

  1. 登录 SMC
  2. 展开服务器管理器
  3. 扩展 SASApp
  4. 扩展 SASApp - 逻辑工作区服务器

在那里您将看到正确的机器,还会显示端口详细信息..

There you will see the correct machine, and will also show the port details..

这篇关于使用 SAS IOM &amp; 创建工作区会话VBA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆