> Dim obWSMgr As New SASWorkspaceManager.WorkspaceManager > Dim obWS As SAS.Workspace > Dim errString As String > Set obWS = obWSMgr.Workspaces.CreateWorkspaceByServer("My workspace", VisibilityNone, Nothing, "", "", errString) > > Dim obDS as SAS.DataService > Dim vName as variant > ' Declare a dynamic array of strings to hold libnames > Dim arLibnames() as string > Set obDS = obWS.DataService > ' pass the dynamic array variable to "ListLibrefs". Upon return, > ' the array variable will be filled in with an array of strings > ' one element for each libref in the workspace > obDS.ListLibrefs arLibnames > ' Print each name in the returned array > For Each vName in arLibnames > debug.print vName > Next vName > ' Print the size of the array > debug.print "Number of librefs was: " & Ubound(arLibnames)+1 > ObWS.Close >>
> > *All the above code works in VFP including the oLibRef = ; > oSAS.DataService.AssignLibref("unixlib","","/mktg01/usg774a","") assignment. > > DIMENSION arlibnames[1] AS String > arlibnames = "x" > > oSAS.DataService.ListLibrefs( @arLibnames ) > For lni = 1 TO ALEN( arlibnames,1) > ? arlibnames[lni] > Next >>