TREE.EXE

Overview

TREE.EXE is a console mode application that builds and displays a tree of the container hierarchy. For each container, the container's type and tag are displayed, followed by a list of filters (possibly empty) which may be acted upon directly at that level of the hierarchy. Following the filter list is a folder list. The folder list gives the folder's type and tag, its filter list, and then a list of scalars for the folders. The scalar display shows the scalar name, type, and access mode. For filters, a list of the filter's attributes are displayed.

This program does not require a datasource connection. It gathers information about the SMS API objects, or object templates, not about specific instances of the objects. There is an important distinction between an object template and a specific instance of the object. A folder instance represents a particular object in the datasource, for example a specific job. A folder template represents the API's notion of the object. Thus, the characteristics of a System job, for example, are predetermined, but the values will be different for each instance of such a job. The same concepts apply to all containers and all folders.

This sample illustrates the self-describing nature of the API objects. It is of interest that a program such as this is, by definition, continually up-to-date. That is, if a future version of the API set were to have additional folders, then this same program could report information about those folder objects without being recompiled or relinked.

Running the Program

Simply type TREE.EXE to run this program. A description of the program will be displayed. The user should then press the ENTER key to continue the program. This program has no user-specified options. The program quits once the data has been displayed.

Functions

SmsAPIVer
SmsEnumContainers
SmsEnumFilters
SmsEnumFolders

Program Flow

This is a relatively simple program. It first gets the number of containers, then it gets the containers themselves, then does the same thing for filters and folders. It then loops through each container and displays all data for the container.

The following information is displayed for each container:

The following information is displayed for each filter:

The following information is displayed for each folder: