Using Tables from a Local or Network Drive

About Using Tables from a Local or Network Drive

You can use tables from the local SAS Workspace Server or network drive to complete these SAS Model Manager tasks:
  • Create a project
  • Create projects from a control table
  • Modify a project definition
  • Create a scoring task
  • Create a model retrain task
  • Create reports
  • Create a performance monitoring task
To use tables from the local or network drive, you must submit a LIBNAME statement to define a libref for the drive before you execute the SAS Model Manager task. You submit LIBNAME statements using the Edit Start-up Code window.
Edit Start-up Code Window
Here is the syntax:
LIBNAME libref <engine> 'SAS-library' <options>
libref
specifies the one- to eight-character name of the SAS library. The first character must be a letter or an underscore (_), and all other characters can be either letters or numbers. The libref cannot contain spaces.
engine
is a SAS engine name. This argument is optional. The default engine is the BASE engine.
SAS-library
is the physical pathname that is recognized by your operating environment. Enclose SAS-library in single quotation marks.
options
are LIBNAME statement options or engine-host options. For more information about options, see the LIBNAME statement in SAS Statements: Reference and the documentation for your operating environment.
Here is an example LIBNAME statement:
libname SalesLib 's:\sales\2013\october';
The BASE engine is used for tables in this library because the engine name was omitted from this statement. For more information about the LIBNAME statement, see SAS Statements: Reference.
SAS Model Manager provides the Edit Start-up Code window where you can submit the LIBNAME statement. Before you submit the LIBNAME statement, make sure that your SAS Model Manager user ID has permission to access the directory that you use in SAS-library.

Create a Libref for a Local or Network Drive

To submit the LIBNAME statement, follow these steps:
  1. Ensure that the path to the library that you want to create exists and that your SAS Model Manager user ID has access to the library.
  2. Select Toolsthen selectEdit Start-up Code. The Edit Start-up Code window appears.
    Edit Start-up Code window
  3. Enter the LIBNAME statement.
  4. Click Run Now.
    A message indicates whether the libref was created. Click the Log tab to see the SAS log.
  5. Click OK. The LIBNAME statement is saved in the Edit Start-up Code window.
    Note: If you save the code without running it by clicking OK, the code automatically runs the next time the middle-tier server starts.
If multiple LIBNAME statements are submitted for the same libref, the last LIBNAME statement defines the libref.
The librefs that you create can be viewed in the Data Sources category view. Select the SAS Libraries tab to view the list:
The SMMTABLE libref in the SAS Libraries Tab

Modify the Path for a Libref

You can modify the path that is used for a libref by resubmitting the LIBNAME statement using the same libref with a different path.
To modify a libref, delete the libref and resubmit the LIBNAME statement.

Delete a Libref

You delete a libref using the Edit Start-up Code window.
  1. Select Toolsthen selectEdit Start-up Code
  2. Type libname libref clear.
  3. Click Run Now.