Skip Headers
Oracle® OLAP DML Reference
10g Release 2 (10.2)

Part Number B14346-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

OBJ

The OBJ function returns information about a workspace object.

Return Value

The return value depends on the value specified for choice. Also, when choice is applicable to only a specific type of object, and you specify a different type of object for object-name, then OBJ returns NA unless otherwise noted.

Syntax

OBJ(choice [object-name])

Arguments

object-name

A TEXT expression that is the name of the object that you want to retrieve information about.

choice

A keyword or keyword phrase which indicates the type of information you want. See Table 21-1, "Keywords for the choice argument of the OBJ Function" for the syntax, data type of the returned value and description of valid keywords.

Table 21-1 Keywords for the choice argument of the OBJ Function

Keyword for choice Data type Description of Returned Value

ACQUIRED

BOOLEAN

Whether the specified object has been acquired for modification in multiwriter mode.

AGGMAP

TEXT (multiline)

The specification of the specified aggmap.

AGGMAPLIST

TEXT (multiline)

The names of the aggmap objects in the specified formula.

ALIASLIST

TEXT (multiline)

The names of the alias dimensions for the specified dimension.

ALIASOF

TEXT

The name of the base dimension for the specified alias dimension.

AW

TEXT

The name of an attached workspace that contains the specified object. When the specified object is in only one attached workspace, AW returns the name of the workspace. When the specified object is in more than one attached workspace, AW still returns only one workspace name. You must use the AWLIST keyword to get all the relevant workspace names. When the object is not in any attached workspace, AW returns NA.

AWLIST

TEXT (multiline)

The names of the attached workspaces that contain an object with the specified name. When you specify a qualified object name for the object, AWLIST returns only the relevant workspace name. When no workspace contains the specified object, AWLIST returns NA.

BTREE

BOOLEAN

Whether a BTREE index was defined for the specified conjoint dimension or composite.

CACHEEMPTY

BOOLEAN

Whether a session cache has been emptied of data for the specified variable. A cache can be emptied by using a CLEAR statement with the CACHE keyword. When object-name is not a variable or when it has no session cache, then CACHEEMPTY returns NA. (For more information on the session cache, see "What is an Oracle OLAP Session Cache?".)

CACHECOUNT

LONG INTEGER

The number of non-NA cells in the session cache for the specified variable. When object-name is not a variable or when it does not have a no session cache, then CACHECOUNT returns NA. (For more information on the session cache, see "What is an Oracle OLAP Session Cache?".)

CHANGED

BOOLEAN

Whether the specified object has been modified since the last UPDATE.

CLASS

TEXT

The storage class of the specified object. Possible return values are:

  • TEMPORARY — An object whose values are not saved in the workspace; applicable to valuesets, variables, relations, and worksheets.

  • An empty string — A permanent object whose values, when modified, are stored in a new place in the workspace until you update and are then included in the update; applicable to all object types.

DATA

TEXT

The data type of the specified object.

  • For dimensions, variables, and formulas, possible return values are INTEGER, SHORTINTEGER, LONGINTEGER, DECIMAL, NUMBER, SHORT (for SHORTDECIMAL), BOOLEAN, ID, TEXT, NTEXT, DATE or DATETIME.

  • For a relation, it returns the name of the related dimension.

  • For a concat dimension, conjoint dimension, composite, or partition template, it returns the names of the base dimensions of an object as a multiline text value.

  • For a program defined with a data type, it returns the name of the data type. For a program defined to return a value of a dimension, returns the name of the dimension.

  • For a valueset, it returns the name of the dimension for which the valueset was defined.

  • For other types of objects, it returns NA.

DEFINE

TEXT (multiline)

The description of the specified object. The value is the same value that DESCRIBE would display for the object minus the words DEFINE and the name of the object.

DFNCHANGED

BOOLEAN

Whether the definition of the specified object has changed since the last UPDATE.

DFNDIMS

TEXT (multiline)

The names of the dimensions and composites in the dimension list that is used to define the specified object. Note that:

  • For an unnamed composite, it returns the form used in the object definition: SPARSE<dim1 dim2 ...>.

  • For a dimension surrogate, it returns the name of the dimension for which the surrogate was defined.

  • When no dimension list was used when the specified object was defined, it returns NA.

DIMMAX

INTEGER

The number of values in the specified dimension. For other object types, it returns 0 (zero).

Note: When you use the DIMMAX choice with a dimension that has a read permission that restricts access to the dimension values, the result returned depends on whether the dimension has previously been loaded. Permissions are evaluated when an object is loaded. Generally, the first time you refer to an object in your session, Oracle OLAP loads the object and evaluates its permissions. However, the OBJ function does not load objects, since it is just providing information about them. When you use DIMMAX with a dimension that has not yet been loaded, the result reflects the entire number of values in the dimension, regardless of whether the dimension has read permissions. When a dimension with permissions has already been loaded, then the DIMMAX choice reflects the permitted size. To ensure that the DIMMAX choice returns the permitted size, you can execute a LOAD statement before using the OBJ function.

DIMS

TEXT (multiline)

The names of the dimensions of the specified object. Specifically:

  • For dimensions, simple, concat, or conjoint, it returns the name of the dimension itself. To find out the base dimensions of a concat or conjoint dimension, use the DATA keyword.

  • For composites, it returns the base dimensions of the composite.

  • For a dimension surrogate, it returns the name of the dimension for which the surrogate was defined.

  • For dimensioned objects, it returns the names of the dimensions of the object.

  • When an object has no dimensions, it returns NA.

DIMTYPE

TEXT

The type of the specified dimension. Specifically:

  • For a concat dimension, it returns CONCAT.

  • For a conjoint dimension, it returns CONJOINT.

  • For a composite, it returns COMPOSITE.

  • For a simple dimension, it returns the data type of the dimension.

  • For a partition template object, it returns PARTITION TEMPLATE.

  • For all other objects, it returns NA.

DISKSIZE

INTEGER

The total number of pages used to store the specified object.

Note: For a temporary object, OBJ(DISKSIZE) returns a value of 0 (zero), because the values of a temporary object are stored in temporary storage and not in the database file.

FORMULA

TEXT

The expression in the definition of the specified formula.

HASAGGCOUNT

BOOLEAN

Whether an Aggcount object is associated with the specified variable. (For more information on Aggcount variables, seesaw "Aggcount Variables".)

HASCACHE

BOOLEAN

Whether a session cache that is local to the session has been established to store data for the specified variable. (For more information on the session cache, see "What is an Oracle OLAP Session Cache?".)

HASH

BOOLEAN

Whether a HASH index was defined for the specified conjoint dimension or composite.

HASHSIZE

INTEGER

The number of pages allocated for the specified hashed dimension's TBLSPACE (that is, the page space containing the anchors for the hash table's K/V node lists). Note that this does not include the number of pages used for the actual Key/Value nodes, which are allocated from the RANSPACE's page space (KVPAGES).

HASPROPERTY prop-name

BOOLEAN

Whether the property specified by prop-name exists for the specified object. (Abbreviated HASPRP)

HIDDEN

BOOLEAN

Whether the text of the specified program or model has been hidden. (For more information on hiding programs and models, see HIDE and UNHIDE.)

INDEXSIZE

INTEGER

The total size of all inversions associated with the specified relation or conjoint dimension.

INORDER

BOOLEAN

Whether the logical order of the values of the underlying dimensions of the specified object matches the physical order in the analytic workspace. INORDER returns TRUE when the logical order of the values of the dimension has not been specified using MAINTAIN with the keywords ADD FIRST, ADD AFTER, ADD BEFORE, or MOVE.

ISBY [RECURSIVE] dimname

BOOLEAN

When you supply object-name, whether the specified object is dimensioned by, related to, or a surrogate for the specified dimension (dimname). When you supply only dimname, whether an object is dimensioned by the dimension you specify in dimname; or when the object is an aggmap, whether the specified dimension is a dimension of any relations or models in the aggmap.

  • RECURSIVE specifies that Oracle OLAP should search for dimname in the base dimensions of the specified object, at any level. the. See Example 21-1, "OBJ With ISBY" .

  • dimname is a text expression that is the name of a dimension. (Oracle OLAP automatically converts the name to uppercase.) When dimname is a composite, the value returned by ISBY indicates whether or not an object was defined with the composite.

Specify a value for object-name when the object is a dimension surrogate, variable, relation, or valueset name to learn if that object is dimensioned by or related to or a surrogate for the specified dimension. You can omit object-name when you are looping through the list of workspace objects to obtain information about more than one object, or when you are using OBJ to limit the NAME dimension.

ISCOMPILED

BOOLEAN

Whether the compilation status of the specified compilable object (such as a program, model, or formula). The value returned depends on the type of object and on whether a compilation error was found in that object. For example:

  • For programs, returns YES when the program has been processed by the compiler since the last time it was modified. A return value of YES does not necessarily indicate that all lines of the program are compiled. See COMPILE for more information.

  • For formulas, returns YES only when the formula was compiled without finding a single error and when the formula can be saved. When the formula contains ampersand substitution, it cannot be saved. When the formula is empty, the ISCOMPILED choice returns NO.

  • For models, returns YES only when the model was compiled without a single error found or when the model is empty.

  • For programs, formulas, and models, returns NO when you delete an object that the program, formula, or model references.

ISCOMPRESSED

BOOLEAN

Whether the specified object is a compressed composite.

ISLATEST

BOOLEAN

Whether the specified object is the latest version of the object. This is the equivalent of OBJ(VERSION)EQ OBJ(LATESTVER).

ISSOLVED

BOOLEAN

When the specified object is a variable which is dimensioned by a compressed composite, whether the variable has been aggregated.

KVSIZE

INTEGER

The number of pages currently allocated to hash and BTREE indexes.

LATESTVER

INTEGER

The current state of the specified object, referring to the most recently committed version of the object. The returned value is either equal to or greater than the value returned by OBJ(VERSION). When the value returned by LATESTVER is greater than that returned by OBJ(VERSION), then another user has updated this object since the analytic workspace was attached in read-only or read-write mode, or, if the analytic workspace was attached in multiwriter mode, since the last resynchronization.

LD

TEXT (multiline)

The LD (long description) of the specified object.

MODEL

TEXT (multiline)

The specification of the specified model.

NACACHECOUNT

INTEGER

The total number of NA cached cells.

NACACHEEMPTY

BOOLEAN

Whether the NA cache is empty.

NAPAGES

INTEGER

The number of pages that contain only NA values and are not stored in the database.

NOHASH

BOOLEAN

Whether the specified conjoint dimension uses the NOHASH index algorithm to load and access data.

NUMCELLS

INTEGER

The total number of physical cells within the specified variable. Oracle OLAP determines this value by finding the Cartesian product of the OBJ(DIMMAX) values for the dimensions of the variable, taking composites into account.

NUMDELS

DECIMAL

The number of deleted cells for the specified dimensioned object.

NUMDFNDIMS

INTEGER

The number of dimensions or composites in the dimension list used to define the specified object. For this count, each composite counts as one, and the dimensions within the dimension list of the composite are not counted. An object defined with a dimension list could be a variable, relation, formula, valueset, concat or conjoint dimension, dimension surrogate, or composite. When no dimension list was used when defining the object (as for single-cell variables, programs, and so on.), it returns 0 (zero).

NUMDIMS

INTEGER

The number of dimensions of the specified dimensioned object; or the number of base dimensions of the specified composite. When the specified object is a dimension is a dimension or dimension surrogate, it returns 1 , and for all other objects, it returns 0 (zero).

NUMSEGS

INTEGER

The number of analytic workspace segments associated with the specified object when that object has more than one dimension. (Note that Oracle OLAP uses segments internally to keep track of the physical storage of the object's values. Too many segments may slow the retrieval of information.)

NUMVALS

INTEGER

The number of values or cells in the specified object. For a compressed composite or a variable dimensioned by a compressed composite, returns an INTEGER value that is the number of logical values in the object (that is, the value that would be returned if the composite was a b-tree composite).

OWNSPACE

BOOLEAN

When the specified object is a conjoint dimension or a composite defined with a BTREE index algorithm, whether the object is using private page space to store BTREE nodes. When the specified object is a variable-width text dimension, a relation, or a variable-width text variable, whether the data for the object is stored in one or more private page spaces that are associated with that object.

PARTBY

TEXT (multiline)

The names of the partition dimensions of the specified partitioned variable or partition template object. The names are returned as a multiline text value (one line for each dimension).

PARTDIMS partitions

TEXT (multiline)

The names of the dimensions of the partitions of the specified partition template or a partitioned variable. The value is returned as a multiline text value (one line for each dimension).

partitions is a multiline text value (one line for each partition name) that specifies which partitions you're asking about. When you specify a partition name that is not a valid partition in partitions, an error occurs.

PARTITION partitions

TEXT (multiline)

For a partitioned variable or a partition template object, a textual description of the partitions of the specified partition template or a partitioned variable. When called on a partition template, the returned description is similar to the DEFINE PARTITION TEMPLATE statement. When called on a partitioned variable, the returned description is similar to the DEFINE VARIABLE statement.

partitions is a multiline text value (one line for each partition name) that specifies which partitions you're asking about.When you specify a partition name that is not a valid partition in partitions, an error occurs.

PARTMETH

TEXT

The method (RANGE, LIST, or CONCAT) by which the specified partition template or a partitioned variable is partitioned.

PARTNAMES

TEXT (multiline)

A multiline TEXT value containing the names of all the defined partitions of the specified partition template. When name is the name of a partitioned variable, returns a multiline TEXT value containing the names of all the partitions of the variable.

Note: Not all of the partitions defined by a partition template necessarily exist in each partitioned variable. Calling OBJ(PARTNAMES)on a partitioned variable returns only those partitions that actually exist within the variable.

PARTRANGE partitions

TEXT (multiline)

The values of the LESS THAN clause for each of the partitions for the specified RANGE partition template or RANGE partitioned variable.

partitions is a multiline text value (one line for each partition name) that specifies which partitions you're asking about. When you specify a partition name that is not a valid partition in partitions, an error occurs.

PERIOD

TEXT

When the specified object is a dimension of type DAY, WEEK, MONTH, QUARTER, or YEAR, the type of the dimension plus an indication of multiple periods or phasing, if any.

PHYSMAX

INTEGER

The maximum physical value for positions within the specified dimension or composite.

PMTMAINTAIN

TEXT

The permission condition for the maintain permission associated with the specified dimension. When there is no maintain permission for the dimension, it returns NA.

PMTPERMIT

TEXT

The permission condition for the permit permission associated with the specified object. When there is no permit permission for the object, it returns NA.

PMTREAD

TEXT

The permission condition for the read permission associated with the specified object. When there is no read permission for the object, it returns NA.

PMTWRITE

TEXT

The permission condition for the write permission associated with the specified object. When there is no write permission for the object, it returns NA.

PRECISION

INTEGER

The precision of the specified NUMBER dimension or variable. The precision is the total number of digits. When the variable was defined without a precision specification, then OBJ returns NA.

PROGRAM

TEXT (multiline)

The text of the specified program.

PROPCHANGED

BOOLEAN

Whether the properties of the specified object have changed since the last UPDATE.

PROPERTY prop-name

WORKSHEET

The value of the specified object's property as specified by prop-name which is a text expression that specifies the name of the property. The data type of the return value is determined at runtime. When the named property does not exist, it returns NA. (Abbreviated PRP)

PROPERTYLIST

TEXT (multiline)

The names of the properties associated with the specified object, one property on a line. The names are in uppercase letters and are stored in the collating sequence for ASCII characters. For objects without properties, it returns NA. (Abbreviated PRPLIST)

PROPERTYTYPE prop-name

TEXT

The data type of object's property as specified by prop-name which is a text expression that specifies the name of the property. The type is derived from the expression used in the PROPERTY statement that created the property. Possible return values are BOOLEAN, TEXT, ID, DATE, DATETIME, NUMBER, INTEGER, LONGINTEGER, DECIMAL, and SHORT.When the named property does not exist or has a value of NA, it returns NA. (Abbreviated PRPTYPE)

PUSHCOUNT

INTEGER

The number of times PUSH has executed for the specified executed This is the same as the number of pushed values currently saved for the specified object..

REFERS text-expression

TEXT (multiline)

The words found in the specified compilable object (for example, a program) that match the ones you specify in text-expression. REFERS returns NA when it does not find any of the specified words, when the specified object is not a compilable object, or when the workspace does not contain any compilable objects. When you supply both arguments, REFERS searches only the specified object for the listed words. When you omit object-name, REFERS searches all the compilable objects in the current workspace.

text-expression is a multiline TEXT expression that is the words for which it should search. Each line in the text value is considered a separate word to be searched for. When, for text-expression, you specify a list of words that is the result of the OBJLIST function, you can produce a cross-reference for compilable objects in the current workspace.

Tip: The search is not case-sensitive; REFERS treats TEXTVAR and Textvar as the same word. REFERS ignores all text that is included in a comment or enclosed in single quotes.

RELATION relation-query

TEXT (multiline)

The default relation (as specified the RELATION command) for the specified object. The values that are returned vary depending on what you specify for relation-query. The syntax for relation-query is:

DEFINELIST | DIMLIST | ACTUAL rel-dimname | SPECIFIED rel-dimname

where:

  • DEFINELIST specifies that the function return all of the names of the dimensions and their associated default relations. As shown in the following example, the names are returned and it associated default relation are returned one per line, alternating between dimension name and its associated default relation.

    dimname1
                      relname1
                      dimname2
                      relname2
    
  • DIMLIST specifies that the function return all of the names of the dimensions for which default relations have been specified. As shown in the following example, Oracle OLAP returns the values one dimension name per line.

    dimname1
                      dimname2
    
  • ACTUAL dimname specifies that the function return the relation that Oracle OLAP uses as the default relation between object-name and its related dimension specified by rel-dimname.

  • SPECIFIED dimname specifies that the function return the name of the relation specified in the RELATION command as the default relation between object-name and its related dimension specified by rel-dimname. This is the value as actually entered in the RELATION command, even if an error occurred entering the data and there is no such relation in the analytic workspace.

RSSIZE

INTEGER

The number of random subset pages used by main object.

SCALE

INTEGER

The scale of a NUMBER dimension or variable. A positive scale indicates the number of digits to the right of the decimal point. A negative scale indicates the number of rounded digits to the left of the decimal point. When the variable was defined without a scale specification, then OBJ returns NA.

SEGWIDTH {dim-name|ALL}

TEXT (multiline)

The default or user-specified segment size of a variable that has more than one dimension and that is associated with either a particular dimension or all dimensions. Each line begins with a segment-size (up to 11 digits) followed by the name of the associated dimension or composite. The dimension name is not included in the line when you specify a dimension and its dimensioned object. In that case only the segment value is returned. When the segment size is reported as zero, it means the default segment size is in effect, and therefore you may need to use CHGDFN to set an appropriate size for the variable's segments.

  • dim-name is a text expression that is the name of a dimension.

  • ALL specifies all dimensions.

SESSION

BOOLEAN

Whether the specified object is a session object.

SHAREMAP

BOOLEAN

When the specified object is dimensioned by a compound dimension, whether the compound dimension is shared with other objects.

SPARSE

TEXT (multiline)

The composites used in the definition of the specified object.

SURROGATELIST

TEXT (multiline)

The surrogates defined for the specified surrogate or dimension.

TRIGGER [triggering-event}

TEXT (multiline)

TRIGGER without a triggering-event keyword returns all the triggering-event keywords and trigger programs names associated with the specified object; or NA when the object does not have any trigger programs associated with it. TRIGGER with a triggering-event keyword returns the names of the trigger programs associated with the specified object event.

Specify the triggering-event using one of the following keywords:

MAINTAIN
DELETE
PROPERTY
ASSIGN
BEFORE_UPDATE
AFTER_UPDATE

TYPE

TEXT

The object type of the specified object.

UNIQUE

BOOLEAN

Whether the specified concat dimension is unique. Returns FALSE for other dimensions, and NA for other object types (including Partition Templates).

UPDATED

BOOLEAN

When the analytic workspace is attached in multiwriter mode, whether the specified object been updated. For other attachment modes, returns NA.

VALCOUNT

INTEGER

The number of logical uncompressed values in the specified compressed composite. For all other dimensions the result is identical to DIMMAX.

VALSIZE

INTEGER

The number of pages used to store the specified object's values. For text dimensions and variables defined without the WIDTH keyword, OBJ(VALSIZE) counts only those pages that contain the four-byte pointers to the text, not the storage for the text itself. For a temporary variable, OBJ(VALSIZE) returns a value of 0 (zero) because the values of a temporary variable are stored in temporary storage and not in the analytic workspace.

VERSION

INTEGER

The current state of the attached version of the specified object. (Note that changes that are updated and committed will increase this number.)

VNF

TEXT

When the specified object is a dimension of type DAY, WEEK, MONTH, QUARTER, or YEAR for which you have defined a VNF (value name format), the VNF of the dimension. For other types of objects, it returns NA.

WIDTH

INTEGER

The width, in bytes, of the storage area of each value of the specified object:

  • For dimensioned INTEGER and BOOLEAN variables that you defined with a width, it returns 1.

  • For dimensioned text variables and text dimensions that you defined with a width, it returns a value between 1 and 4000, which identifies the defined width.

  • For all other objects, it returns NA.


object-name

A text expression that contains the name of the object in which you are interested. The object can be in any attached workspace. When you specify object-name as a text literal, you must enclose it in single quotes. (Oracle OLAP automatically converts the name to uppercase.) When you specify the name of a program as the object-name and you omit the quotes, Oracle OLAP runs the program and uses its return value as the name of the object to be supplied as object-name.

You can omit object-name when you are using the OBJ function as part of a statement, such as the LIMIT command, that loops through the NAME dimension. In this case, the return value is dimensioned by the NAME dimension in the current workspace.

Examples

See also:

For examples of using the OBJ function to retrieve default relation information, see Example 22-12, "Specifying a Default Relation Using the Relation Command"

Example 21-1 OBJ With ISBY

For example, the following statement limits NAME to all the objects dimensioned by month.

LIMIT NAME TO OBJ(ISBY 'month')

You can use ISBY to find out if a dimension is a base dimension of a concat or conjoint dimension or a composite. For example, assume that you had a conjoint dimension named proddist whose base dimensions were product and district. In this case, the following statement returns YES.

SHOW OBJ(ISBY 'district' 'proddist')

You can use ISBY to find out if a dimension is a dimension of a relation or a model used in an aggmap. For example, assume that you had an aggmap called myaggmap and you wanted to find out if a dimension named mydimension was used in any relations or models within myaggmap. In this case, you could issue the following statement.

SHOW OBJ(ISBY 'mydimension' 'myaggmap')

To determine whether a specified dimension is a base dimension at any level, you must use ISBY with the RECURSIVE keyword. For example, assume that you had a conjoint dimension named proddist.mon whose base dimensions were proddist and month and a variable proddist.sales dimensioned by proddist. In this case, each of the following statements would return NO.

SHOW OBJ(ISBY 'district' 'proddist.mon')
SHOW OBJ(ISBY 'district' 'proddist.sales')

However, when you use ISBY with the RECURSIVE keyword, each of the following statements would return YES.

SHOW OBJ(ISBY RECURSIVE 'district' 'proddist.mon')
SHOW OBJ(ISBY RECURSIVE 'district' 'proddist.sales')

Example 21-2 Getting Information about a Variable

This example illustrates the use of several choices of the OBJ function to obtain information about the variable sales. The definition of sales is as follows.

DEFINE sales VARIABLE DECIMAL <month product district>
LD Sales Revenue
  • The statement

    SHOW OBJ(TYPE 'sales')
    

    produces the following output.

    VARIABLE
    
  • The statement

    SHOW OBJ(DATA 'sales')
    

    produces the following output.

    DECIMAL
    
  • The statement

    SHOW OBJ(DIMS 'sales')
    

    produces the following output.

    MONTH
    PRODUCT
    DISTRICT
    
  • The statement

    SHOW OBJ(ISBY 'product' 'sales')
    

    produces the following output.

    YES
    
  • The statement

    SHOW OBJ(LD 'sales')
    

    produces the following output.

    Sales Revenue
    

Example 21-3 Returning the Name of the Object or the Type of the Object

Suppose textvar is a variable whose value is geog, which is the name of a dimension. Whether you enclose the word textvar in quotation marks determines whether the following OBJ function calls return the word VARIABLE (the type of object textvar is) or DIMENSION (the type of object geog is).

SHOW OBJ(TYPE 'textvar')
VARIABLE

SHOW OBJ(TYPE textvar)
DIMENSION

Example 21-4 Using OBJ to Select Objects

This example uses OBJ and DESCRIBE to look at the definitions of all the relations in a workspace. The Oracle OLAP statements

LIMIT NAME TO OBJ(TYPE) EQ 'RELATION'
DESCRIBE

produce the following output.

DEFINE REGION.DISTRICT RELATION REGION <DISTRICT>
LD REGION for each DISTRICT
 
DEFINE DIVISION.PRODUCT RELATION DIVISION <PRODUCT>
LD DIVISION for each PRODUCT
 
DEFINE MLV.MARKET RELATION MARKETLEVEL <MARKET>
 
DEFINE MARKET.MARKET RELATION MARKET <MARKET>
LD Self-relation for the Market Dimension

Example 21-5 Counting Compiled Objects

The following statements count how many compilable objects in your workspace are compiled and how many are not compiled. Each statement loops over the objects in the current workspace. The OBJ function returns YES for each object that is compiled, NO for each compilable object that is not compiled, and NA for objects that are not compilable. When NASKIP is YES (the default), the COUNT function in the first statement counts the number of YES values that are returned by OBJ, and in the second statement it counts the number of NO values that are returned.

SHOW COUNT(OBJ(ISCOMPILED))
SHOW COUNT(NOT OBJ(ISCOMPILED))

Example 21-6 OBJ with REFERS

The following statement searches the compilable objects in the current workspace for references to the objects in all the attached workspaces. The output lists the non-compilable objects in the current workspace too, but the return value for them is NA.

REPORT OBJ(REFERS OBJLIST(AW(LIST)))

In the following example, OBJ(REFERS) tells you whether var1, var2, or var3 appears in the myprog program. The return value of OBJ(REFERS) is a multiline text value that contains the references it finds. When only var1 and var3 appear in the program, then the return value contains those two names, each on a separate line. The statement

SHOW OBJ(REFERS 'var1\nvar2\nvar3' 'myprog')

produces the following output.

VAR1
VAR3

When you do not specify the name of a program or formula to be searched, OBJ(REFERS) returns a single-line or multiline text value for each object in the NAME dimension of the current workspace. For objects that are not programs or formulas, NA is returned. The statement

REPORT OBJ(REFERS 'var1\nvar2\nvar3')

produces the following output.

OBJ(REFERS
                 'var1
                  var2
NAME           var3' )
-------------- ----------
PRODUCT        NA
DISTRICT       NA
DIVISION       NA
LINE           NA
QUARTER        NA
REGION         NA
YEAR           NA
MONTH          NA
   ...
MYPROG         VAR1
               VAR3
VAR1           NA
VAR2           NA
VAR3           NA

Example 21-7 OBJ with PROPERTY

In the following example, OBJ(PROPERTY) returns information about the decplace property of the actual variable. (See PROPERTY.) The user created this property to store the number of decimal places and now wants to obtain that value to produce a report of the actual variable.

The statements

CONSIDER actual
PROPERTY 'decplace' 4
LIMIT month TO FIRST 1
LIMIT division TO 'Camping'
REPORT ACROSS month W 20 DECIMAL OBJ(PROPERTY 'decplace' -
'actual') actual 

produce the following output.

DIVISION: CAMPING
               -------ACTUAL-------
               -------MONTH--------
LINE                  JAN 95
-------------- --------------------
Revenue                533,362.8800
Cogs                   360,810.6600
Gross.Margin           172,552.2200
Marketing               37,369.5000
Selling                 89,007.3800
R.D                     24,307.5000
Opr.Income              21,867.8400
Taxes                   15,970.3900
Net.Income               5,897.4500

Example 21-8 OBJ with SEGWIDTH

The following statements show how to change and display segment size values for all of a variable's dimensions.

CHGDFN sales SEGWIDTH 150 5000 50
SHOW OBJ(SEGWIDTH ALL 'sales')

These statements produce the following output.

150 MONTH
5000 PRODUCT
  50 DISTRICT

The following statement shows how to obtain the segment size value for a specific dimension.

SHOW OBJ(SEGWIDTH 'product' 'sales')

This statement produces the following output.

5000

The following statement shows how to obtain a list of segment sizes for every multidimensional variable or relation associated with the dimension.

When object-name is not specified, you need to use REPORT rather than SHOW to obtain a value for each object in the NAME dimension.

REPORT OBJ(SEGWIDTH 'product')

This statement produces the following output.

NAME           OBJ(SEGWIDTH 'product')
-------------- -----------------------
SALES          5000
SALES.FORECAST 5000
SALES.PLAN     5000
SHARE          5000
UNITS          5000
UNITS.M        0
   ...

The following statement shows how to produce a list of segment sizes for all dimensions in the current workspace.

REPORT OBJ(SEGWIDTH ALL)

This statement produces the following output.

NAME           OBJ(SEGWIDTH ALL)
-------------- -----------------
SALES          150 MONTH
               5000 PRODUCT
               50 DISTRICT
 
SALES.FORECAST 150 MONTH
               5000 PRODUCT
               50 DISTRICT
    ...