Skip Headers

Oracle9i OLAP Developer's Guide to the OLAP DML
Release 2 (9.2)

Part Number A95298-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

Defining and Working with Analytic Workspaces, 9 of 9


Obtaining Analytic Workspace Information

The AWDESCRIBE program displays a complete description of your analytic workspace, including:

Because the output from AWDESCRIBE is frequently very long, you can direct it to a file with the OUTFILE command:

OUTFILE 'diralias/filename'
AWDESCRIBE
OUTFILE EOF

Where diralias is the name of a directory alias, and filename is the name of the file where the information will be written.

Contact your DBA for the name of a directory alias to which you have read and write privileges.

Obtaining General Information About an Analytic Workspace

The AW function returns various kinds of information about attached analytic workspaces. For example, you can use the AW function to learn the name of your current workspace or whether you have read/write access to it.

The simplified syntax of the AW function is shown below.

AW(choice [workspace])

The keyword you specify for choice determines the type of information that is returned by the AW function. Examples of keywords are: ATTACHED, NAME, RO, and RW.

For example, the following commands check which analytic workspace is active so the program can choose the appropriate data to report.

IF AW(NAME) EQ 'mysales'
     THEN REPORT sales.m
     ELSE REPORT gensales

Viewing Objects in an Analytic Workspace

You can retrieve a list of the objects in an analytic workspace by using the LISTNAMES program. This program lists all the objects in the analytic workspace, grouped by object type and alphabetized within object type. LISTNAMES shows the total number of each type of object (dimension, variable, and so on).

Use the LISTBY command to retrieve a list of all objects that are dimensioned by, or related to, a given dimension.

For example, to find out which objects are dimensioned by, or related to, month, you can use the following command.

LISTBY month

The following list is displayed.

14 objects dimensioned by or related to MONTH in DEMO
--------------------------------------------------------------
ACTUAL         ADVERTISING        BUDGET
EXPENSE        FCST               NATIONAL.SALES
PRICE          PRODUCT.MEMO       SALES
SALES.FORECAST SALES.PLAN         SHARE
UNITS          UNITS.M

To display the definitions of one or more objects, use the DESCRIBE command. For example, you can issue the following command.

DESCRIBE price

It produces the following output.

DEFINE PRICE VARIABLE DECIMAL <MONTH PRODUCT>
LD Wholesale Unit Selling Price

If you execute the DESCRIBE command without any object names, all the objects in the current status list of the NAME dimension are described. The NAME dimension contains the names of all the objects that are defined in the analytic workspace.

You can display the values of many workspace objects, such as variables, dimensions and relations, by executing a REPORT command. For example, the following command shows the values of a variable called costs.

report costs

This command might produce the following output.

          ------------------------COSTS------------------------------
          ----------------------GEOGRAPHY----------------------------
                                                  
DIVISION     EAST       WEST      BOSTON   SAN FRANCISCO      SEATTLE
--------- ---------- ---------- ---------- -------------    ----------
DIVA       27,600.00  50,000.00  27,600.00  10,000.00       40,000.00
DIVB       30,000.00  62,000.00  30,000.00  12,000.00       50,000.00

Obtaining Information About Objects

To obtain information about workspace objects, you can use the OBJ function.

For example, the following command obtains the number of dimensions for the variable units. The output is shown below the command.

SHOW OBJ(NUMDIMS 'units')
3

The following command obtains the data type of the units variable. The output is shown below the command.

show obj(data 'units') 
INTEGER

You often use the OBJ function in conjunction with the LIMIT command and the NAME dimension in order to obtain information about groups of objects. The LIMIT command sets the status of a dimension. This means that it restricts the accessibility of dimension values, which sets a corresponding restriction on any variables or relations that are dimensioned by them.

You can use the LIMIT command together with the OBJ function to identify a group of objects with a particular characteristic. Then, you can list the objects in the group using the STATUS command.

The following commands lists the objects that are dimensioned by both month and product.

LIMIT NAME TO OBJ(ISBY 'month') AND OBJ(ISBY 'product')
STATUS NAME

The output of these commands is shown below.

The current status of NAME is:
ADVERTISING, EXPENSE, NATIONAL.SALES, PRICE, PRODUCT.MEMO, SALES, 
SALES.FORECAST, SALES.PLAN, SHARE, UNITS, UNITS.M
See Also:

Chapter 6, "Selecting Data" for information about using the LIMIT command.


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 2001, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback