Previous Page | Next Page

Customizing the SAS/Warehouse Administrator Interface

Add-In Tools

Add-in tools are SCL applications that extend the functionality of SAS/Warehouse Administrator. If any add-ins have been installed in your copy of SAS/Warehouse Administrator, you can display them as follows:

  1. Open an Environment in the SAS/Warehouse Administrator Explorer.

  2. From the main menu, select Tools [arrow] Add-Ins

    A list of add-ins will be displayed.

Add-in tools are used to customize SAS/Warehouse Administrator for your site. You can write your own tools, or you can obtain the tools that have been developed by SAS. To obtain the add-in tools that have been developed by SAS, see Customizing SAS/Warehouse Administrator. Use this section as a reference when writing your own add-in tools.


Customizing the Add-In Tools Registry

The Add-In Tools Registry is a SAS data set that contains references to any add-in tools that have been installed for a given copy of SAS/Warehouse Administrator. When you install add-in tools that have been developed by SAS, the registry is updated by the installation routine. If you develop your own add-in tool, you must update the Add-In Tools Registry so that your tool will be available in SAS/Warehouse Administrator.

The purpose of the tool registry is to provide greater flexibility in the entry that is called, as well as the parameters that the entry is called with. The registry data set is contained in the SASHELP library and has a name of WATOOLS. Any site-specific add-ins can be installed into the SASHELP.WATOOLS, or can be installed as _SASWA.WATOOLS. If the _SASWA.WATOOLS data set is found, its entries and not those of SASHELP.WATOOLS will be used.


Registry Format

The Add-In Tools Registry has the following format:

MNEMONIC

is an indicator of which frame the SCL program is being called from. Examples:

  • USERTOOL (called from the Explorer)

  • USERPRCS (called from the Process Editor)

  • USERSETP (called from the Setup Frame)

ENTRY

is the four-level name of the entry to call. This entry can be of any type that can be called using the SCL CALL DISPLAY function.

NAME

is the name of the tool or tool group. This would be the name shown on the secondary pop-up list when the Tools menu option is selected.

ACTIVE

is an integer variable, which indicates whether a tool is currently active. A value of zero or missing would indicate that the tool is currently inactive. Any other value indicates that the tool is active. This is provided for entries to remain in the table, but in a deactivated state.

PARMFMT

is an integer variable indicating the type of parameter list expected by the add-in:

  • 0 -- The add-in expects no parameters. There is no entry statement in the called program, or the entry statement contains optional parameters. This parameter format is consistent with Release 1.1

  • 1 -- The tool expects 1 parameter. This parameter is a list of named items that allow information to be passed from SAS/Warehouse Administrator to the called add-in.

    L_PARMS -- The list of named items that allow information to be passed from the called add-in. The current list of named items that can be passed are

    • REFRESH -- A returned numeric value that indicates that SAS/Warehouse Administrator should refresh the displayed screen upon return from the add-in. If a value of 1 is returned, SAS/Warehouse Administrator will refresh the screen as appropriate upon return. Any other value will be ignored and no refresh will be performed.

    • MNEMONIC -- A character item that is passed to the add-in indicating the context in which the add-in was called. The value corresponds to the allowable mnemonics as documented under the registry format.

    The entry statement for the called tool should be coded as follows:

    entry l_parms 8;
  • 2 -- The tool uses the Metadata API and thus expects the following three parameters.

    • ID -- The metadata ID of the object that is currently selected in the active SAS/Warehouse Administrator frame. If no object is currently active, this field contains a blank value.

    • I_API -- An initialized instance of the metadata API object.

      Note:   The called application should not terminate the API object passed. It will be terminated when control is returned to the SAS/Warehouse Administrator.  [cautionend]

    • L_PARMS -- The list of named items that allow information to be passed from the called add-in. See the previous paragraphs for a more detailed description of the contents of this list.

    The entry statement for the called tool should be coded as follows:

    entry id $ 26 I_api 8 l_parms 8;
DESC

is a 200-character field that will contain a description of the entry in this row. It will not be shown through the user interface but is merely for information purposes when editing the table.


Example Add-In Tools Registry

Here is an example that clarifies how tool registry parameters affect the availability of add-in tools available from the Add-Ins pull-down menu. Suppose that the SASHELP.WATOOLS data set contained the information in the following table.

Example Add-In Tools Registry
MNEMONIC ENTRY NAME ACTIVE PARM-FMT DESC
USERTOOL _SASWA.DW.USERTOOL.SCL User-Written Tools 1 0
USERSETP SASHELP.ADMIN.WATOOLS.FRAME Administration Tools 1 1
USERTOOL SASHELP.DWEXPLT.IMPORT.FRAME Import Data Model 1 2
USERTOOL SASHELP.DWEXPLT.EXPORT.FRAME Export Data Model 0 2
USERPRCS _SASWA.DW.USERPRCS.SCL User Written Tools 1 0

When the File [arrow] Tools [arrow] Add-Ins pull-down menu option is selected from the Explorer, a query will be issued against the data set with an alias USERTOOL and Active=1. If more than one row is found to match the query, a secondary pop-up list is shown that contains the names of the registered add-in tools. For example,

Note that the Export Data Model add-in is not included because it is marked as Inactive. If only one row is found, then no pop-up list is displayed. When you select an add-in tool, a search is performed for the corresponding catalog entry. If the entry is not found, an error message is displayed stating that the add-in could not be found. If the entry is found, it is called by using a CALL DISPLAY SCL function.

Previous Page | Next Page | Top of Page