Neatware Header
Home   Products   Forums   Partners   Buy   Company   Contact   Blog   

SAS

SAS is a software package for statistics. It provides an ActiveX automation server that allows Tcl access its services.

#
# Use SAS Automation Server by MyrmecoX 
#
package require myrmecox
#
# open SAS application
#
set obWS [::tcom::ref createobject "SAS.Workspace"]
#
# launch DataService
#
set obDS [$obWS DataService]
#
# Assign a Libref named "mysaslib" within the new workspace
#
set obLibref [$obDS AssignLibref "mysaslib" "" "c:\mysaslib" ""]
puts [$obLibref Name]
#
# Deassign the Libref
#
$obDS DeassignLibref [$obLibref Name] 
#
# close
#
$obWS Close
exit