<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic SAS Integration Technologies &amp;gt;&amp;gt; Create workspace server &amp;gt;&amp;gt; Unspecified error ( 0x80004005 ) in Developers</title>
    <link>https://communities.sas.com/t5/Developers/SAS-Integration-Technologies-gt-gt-Create-workspace-server-gt-gt/m-p/874841#M6343</link>
    <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We recently upgrade our SAS environment from PC SAS to SAS Studio. After some research, we decided to use SAS Integration Technologies to build our batch submit tool (remote submit programs from client machines/VMs to SAS server). The prototype works on our currently VMs (which has PC SAS installation). We need to test the tool on the environment that has no BASE SAS installation. Based on the documentation, I was under the impression that it should work as long as SAS Integration Technologies client for windows is installed. However, after testing I couldn't get the tool running on the test machine. To be accurate, with&amp;nbsp;SAS Integration Technologies installed, the tool can run but failed in creating workspace server. Below is the (PowerShell) code that fails:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$objFactory = New-Object -ComObject SASObjectManager.ObjectFactoryMulti2
$objServerDef = New-Object -ComObject SASObjectManager.ServerDef
$objServerDef.MachineDNSName = "&amp;lt;SAS-Workspace-Server-Address&amp;gt;"
$objServerDef.Port = 8591 
$objServerDef.Protocol = 2
$objServerDef.ClassIdentifier = "440196d4-90f0-11d0-9f41-00a024bb830c"

try {
    # create and connect to the SAS session 
    $workspaceserver = $objFactory.CreateObjectByServer(
        "SASApp", # server name
        $true, 
        $objServerDef, # built server definition
        "&amp;lt;User-Name&amp;gt;", # user ID
        "&amp;lt;Password&amp;gt;"    # password
    )
    $workspaceserver.LanguageService.Submit("option set=a=""Hello World"";") 
    $sasrtn = "" 
    $rc = $WorkspaceServer.Utilities.HostSystem.GetEnv("a", [ref] $sasrtn) 
    Write-Host $sasrtn
    $workspaceserver.Close()
}
catch [system.exception] {
    Write-Host "Could not connect to SAS session: " $_.Exception.Message
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error I got is&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Could not connect to SAS session:  &amp;lt;connectionAttempts&amp;gt;
        &amp;lt;connectionAttempt&amp;gt;
                &amp;lt;description&amp;gt;Unspecified error&amp;lt;/description&amp;gt;
                &amp;lt;status&amp;gt;0x80004005&amp;lt;/status&amp;gt;
                &amp;lt;saslogin&amp;gt;XXXXXXXXXXXXXX&amp;lt;/saslogin&amp;gt;
                &amp;lt;sasmachinednsname&amp;gt;XXXXXXXXXXXXXX&amp;lt;/sasmachinednsname&amp;gt;
                &amp;lt;sasport&amp;gt;8591&amp;lt;/sasport&amp;gt;
                &amp;lt;sasclassid&amp;gt;440196d4-90f0-11d0-9f41-00a024bb830c&amp;lt;/sasclassid&amp;gt;
                &amp;lt;sasprogid&amp;gt;SAS.Workspace.1.0&amp;lt;/sasprogid&amp;gt;
                &amp;lt;threadid&amp;gt;4704&amp;lt;/threadid&amp;gt;
                &amp;lt;name&amp;gt;SASApp&amp;lt;/name&amp;gt;
        &amp;lt;/connectionAttempt&amp;gt;
&amp;lt;/connectionAttempts&amp;gt;&lt;/PRE&gt;&lt;P&gt;The same code can run sucessfully on our current VM where BASE SAS is installed. I can't tell if this is due to some settings on the test machine that is irrelevant to SAS, or is it due to the fact that&amp;nbsp;SAS Integration Technologies alone cannot support the funtion of this code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any experience on this topic? Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 May 2023 09:47:49 GMT</pubDate>
    <dc:creator>kenwdcao</dc:creator>
    <dc:date>2023-05-10T09:47:49Z</dc:date>
    <item>
      <title>SAS Integration Technologies &gt;&gt; Create workspace server &gt;&gt; Unspecified error ( 0x80004005 )</title>
      <link>https://communities.sas.com/t5/Developers/SAS-Integration-Technologies-gt-gt-Create-workspace-server-gt-gt/m-p/874841#M6343</link>
      <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We recently upgrade our SAS environment from PC SAS to SAS Studio. After some research, we decided to use SAS Integration Technologies to build our batch submit tool (remote submit programs from client machines/VMs to SAS server). The prototype works on our currently VMs (which has PC SAS installation). We need to test the tool on the environment that has no BASE SAS installation. Based on the documentation, I was under the impression that it should work as long as SAS Integration Technologies client for windows is installed. However, after testing I couldn't get the tool running on the test machine. To be accurate, with&amp;nbsp;SAS Integration Technologies installed, the tool can run but failed in creating workspace server. Below is the (PowerShell) code that fails:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$objFactory = New-Object -ComObject SASObjectManager.ObjectFactoryMulti2
$objServerDef = New-Object -ComObject SASObjectManager.ServerDef
$objServerDef.MachineDNSName = "&amp;lt;SAS-Workspace-Server-Address&amp;gt;"
$objServerDef.Port = 8591 
$objServerDef.Protocol = 2
$objServerDef.ClassIdentifier = "440196d4-90f0-11d0-9f41-00a024bb830c"

try {
    # create and connect to the SAS session 
    $workspaceserver = $objFactory.CreateObjectByServer(
        "SASApp", # server name
        $true, 
        $objServerDef, # built server definition
        "&amp;lt;User-Name&amp;gt;", # user ID
        "&amp;lt;Password&amp;gt;"    # password
    )
    $workspaceserver.LanguageService.Submit("option set=a=""Hello World"";") 
    $sasrtn = "" 
    $rc = $WorkspaceServer.Utilities.HostSystem.GetEnv("a", [ref] $sasrtn) 
    Write-Host $sasrtn
    $workspaceserver.Close()
}
catch [system.exception] {
    Write-Host "Could not connect to SAS session: " $_.Exception.Message
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error I got is&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Could not connect to SAS session:  &amp;lt;connectionAttempts&amp;gt;
        &amp;lt;connectionAttempt&amp;gt;
                &amp;lt;description&amp;gt;Unspecified error&amp;lt;/description&amp;gt;
                &amp;lt;status&amp;gt;0x80004005&amp;lt;/status&amp;gt;
                &amp;lt;saslogin&amp;gt;XXXXXXXXXXXXXX&amp;lt;/saslogin&amp;gt;
                &amp;lt;sasmachinednsname&amp;gt;XXXXXXXXXXXXXX&amp;lt;/sasmachinednsname&amp;gt;
                &amp;lt;sasport&amp;gt;8591&amp;lt;/sasport&amp;gt;
                &amp;lt;sasclassid&amp;gt;440196d4-90f0-11d0-9f41-00a024bb830c&amp;lt;/sasclassid&amp;gt;
                &amp;lt;sasprogid&amp;gt;SAS.Workspace.1.0&amp;lt;/sasprogid&amp;gt;
                &amp;lt;threadid&amp;gt;4704&amp;lt;/threadid&amp;gt;
                &amp;lt;name&amp;gt;SASApp&amp;lt;/name&amp;gt;
        &amp;lt;/connectionAttempt&amp;gt;
&amp;lt;/connectionAttempts&amp;gt;&lt;/PRE&gt;&lt;P&gt;The same code can run sucessfully on our current VM where BASE SAS is installed. I can't tell if this is due to some settings on the test machine that is irrelevant to SAS, or is it due to the fact that&amp;nbsp;SAS Integration Technologies alone cannot support the funtion of this code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any experience on this topic? Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 09:47:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-Integration-Technologies-gt-gt-Create-workspace-server-gt-gt/m-p/874841#M6343</guid>
      <dc:creator>kenwdcao</dc:creator>
      <dc:date>2023-05-10T09:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Integration Technologies &gt;&gt; Create workspace server &gt;&gt; Unspecified error ( 0x800</title>
      <link>https://communities.sas.com/t5/Developers/SAS-Integration-Technologies-gt-gt-Create-workspace-server-gt-gt/m-p/874896#M6345</link>
      <description>&lt;P&gt;This doesn't answer your question but it could be something to consider given your use case (migration of PC SAS to work on a remote machine)&lt;BR /&gt;&lt;BR /&gt;My team have built an open source REST API for Base SAS, the source is here:&amp;nbsp; &lt;A href="https://github.com/sasjs/server" target="_blank"&gt;https://github.com/sasjs/server&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Using this you can batch submit SAS programs from any client on any network connected (non-SAS) machine, including the SASjs CLI (&lt;A href="https://cli.sasjs.io" target="_blank"&gt;https://cli.sasjs.io&lt;/A&gt;), and fetch both the log and print output.&lt;BR /&gt;&lt;BR /&gt;Docs are here:&amp;nbsp; &lt;A href="https://server.sasjs.io" target="_blank"&gt;https://server.sasjs.io&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If you were to use the SASjs CLI to set up your batch process, the benefit would be a very smooth migration to Viya at a later date (the functionalities work the same regardless of server type)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 11:44:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-Integration-Technologies-gt-gt-Create-workspace-server-gt-gt/m-p/874896#M6345</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2023-05-10T11:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Integration Technologies &gt;&gt; Create workspace server &gt;&gt; Unspecified error ( 0x800</title>
      <link>https://communities.sas.com/t5/Developers/SAS-Integration-Technologies-gt-gt-Create-workspace-server-gt-gt/m-p/875116#M6346</link>
      <description>&lt;P&gt;Apologies, I don't have SAS so working from memory.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I thought that when you installed SAS IT, it would install a small client program for testing. It is in your Windows Menu under SAS Integration Technologies. Use that to get your client working before putting it into PowerShell.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is some C# code I have used with references to InterOp.ADODB, SAS, SASObjectManager, SASWorkspaceManager). I have lots of code around this area so ping if needed and I will drop on github. When given a choice, I prefer C# to PowerShell. Both are good but C# is easier to read and maintain, IMO:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;        private Workspace CreateWorkspace()
        {
            Workspace sasWorkspace;
            try
            {
                var objFactory = new ObjectFactoryClass();
                var serverDef = new ServerDefClass();

                // ************************************************
                // Configure the SAS server information.
                // ************************************************

                serverDef.BridgeEncryptionAlgorithm = "SASProprietary";
                serverDef.BridgeEncryptionLevel = EncryptionLevels.EncryptUserAndPassword;
                serverDef.MachineDNSName = DnsName;
                serverDef.Port = Port;
                serverDef.Protocol = Protocols.ProtocolBridge;

                // ************************************************
                // Create the connection.
                // ************************************************

                sasWorkspace =
                    (Workspace) objFactory.CreateObjectByServer("BridgeConnection", true, serverDef, UserId, Password);
            }
            catch (Exception ex)
            {
                util.HandleError(MethodBase.GetCurrentMethod().Name, ex);
                return null;
            }
            return sasWorkspace;
        }&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 May 2023 23:49:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-Integration-Technologies-gt-gt-Create-workspace-server-gt-gt/m-p/875116#M6346</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2023-05-10T23:49:29Z</dc:date>
    </item>
  </channel>
</rss>

