BookmarkSubscribeRSS Feed
Clash
Obsidian | Level 7

Hi all!

 

I am new to SAS AMO in Excel and I'm trying to run a Stored Process (STP) and get the results back to my spreadsheet. Running the STP works fine but the results not. The error message is that it can't find the server -->

Capture.PNG

 

The VBA code that I'm using:

 

Sub InsertStoredProcess()
  Dim sas As SASExcelAddIn
  Set sas = Application.COMAddIns.Item("SAS.ExcelAddIn").Object
  sas.InsertStoredProcess "/Solvens 2 : Verksamheten/Aktuarie/BI Content/ClaesExcelAMO_DEV", Sheet1.Range("A1")

  Dim displayData As SASDataView
 Set displayData = sas.InsertDataFromLibrary("SASApp", "slasklib", "Yalla", Sheet2.Range("A5"), 25, False, "", False)
End Sub

 

(if I use the SASHELP library and dataset CLASS, it works fine)

 

Do I need to define my library in another way? (they are pre-assinged, type "By native library Engine")

 

Anyone knows what I'm doing wrong?

 

(SAS 9.3 M2 and SAS Add-In 7.1)

 

Regards,

Claes

5 REPLIES 5
Kurt_Bremser
Super User

Start Enterprise Guide, use the same credentials you use in the AMO, connect to SASApp and look for library slasklib.

The only thing that comes to mind is that the user used in AMO does not have the same permissions as sassrv (which is most probably used to start the STP server instances)

Clash
Obsidian | Level 7
Hi!
Good point, didn't think about this (the user in STP session isn't the same as the user used in AMO).

I shall speak to my DBA,

Thank you very much!
/Claes
Kurt_Bremser
Super User

Keep in mind that there are possibly three UserIDs in play here:

1) sassrv, a user on the OS level that physically runs the STP server processes

2) the metadata user ID that is used to call the STP; this might even be an internal ID (no OS account assigned)

3) the userid used from the AMO. Since the AMO most probably connects to a non-pooled workspace server, this userID needs to be in metadata and OS

 

1) and 3) need physical access to the path, 2) and 3) need metadata permissions for the library.

2) and 3) might be identical, of course

Clash
Obsidian | Level 7
Solved!
Spoke to my DBA and he figured it out. The solution was to use the metadata name (library) instead of the its physical name, works like a Dream!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1440 views
  • 0 likes
  • 2 in conversation