Skip Headers

Oracle® OLAP DML Reference
10g Release 1 (10.1)

Part Number B10339-02
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
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

OBJ

The OBJ function returns information about a workspace object.

Return Value

The return value depends on the choice keyword.

Syntax

OBJ(choice [object-name])

where choice is one of the following keywords that indicates the type of information you want:

AGGMAP
AGGMAPLIST
ALIASLIST
ALIASOF
AW
AWLIST
BTREE
BTREE SHARED
CACHECOUNT var-name
CACHEEMPTY var-name
CLASS
DATA
DFNDIMS
DIMMAX
DIMS
DIMTYPE
DISKSIZE
FORMULA
HASCACHE var-name
HASH
HASPROPERTY prop-name
HIDDEN program-name
INORDER
ISBY  [RECURSIVE] dimension-name [object-name]
ISCOMPILED
KVSIZE
LD
MODEL
NAPAGES
NOHASH
NUMDELS
NUMDFNDIMS
NUMDIMS
NUMSEGS
NUMVALS
OWNSPACE
PARTBY
PARTDIMS partitions
PARTITION partitions
PARTMETH
PARTNAMES
PARTRANGE partitions
PERIOD
PHYSVALS
PMTMAINTAIN
PMTPERMIT
PMTREAD
PMTWRITE
PRECISION
PROGRAM
PROPERTY prop-name
PROPERTYLIST
PROPERTYTYPE prop-name
REFERS  text-expression 
SCALE
SEGWIDTH {dimension-name | ALL} 
SPARSE
SURROGATELIST {surrogate|dimension}
TRIGGER [triggering-event]
TYPE
VALSIZE
VNF
WIDTH

Arguments

AGGMAP

Returns a TEXT value which is the specification of the aggmap that you specify.

AGGMAPLIST

Returns a TEXT value which is the aggmap objects in the formula that you specify.

ALIASLIST

Returns a TEXT value which is the alias dimensions for the dimension that you specify.

ALIASOF

Returns a TEXT value which is the base dimension for the alias dimension that you specify.

AW

Returns a TEXT value which is the name of an attached workspace that contains an object with the specified name. 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

Returns a multiline TEXT value each line of which is the name of an attached workspace that contains 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, AW returns NA.

BTREE

Returns a BOOLEAN value that indicates whether a conjoint dimension or a composite is using the BTREE index algorithm to load and access data. For other types of objects, it returns NA.

CACHEEMPTY var-name

Returns a BOOLEAN value that indicates whether a session cache has been emptied of data for var-name which is a text expression that specifies the name of the variable. A cache can be emptied by using the CLEAR command with the CACHE keyword. When var-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 var-name

Returns a LONG INTEGER value which is the number of non-NA cells in the session cache for var-name which is a text expression that specifies the name of the variable. When var-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?".)

CLASS

Returns a TEXT value which is the storage class of an object. Possible return values are:

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

  • null — 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

Returns a TEXT value which is the data type of an object.

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


    Tip:

    To find out the type of time period represented by dimensions of type DAY, WEEK, MONTH, QUARTER, and YEAR, use the PERIOD choice.

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

  • For a concat or conjoint dimension or a composite, 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 valueset, it returns the name of the dimension for which the valueset was defined.

  • For other types of objects, it returns NA.

DFNDIMS

Returns a TEXT value which is a multiline text value that contains the names of the dimensions and composites in the dimension list that is used to define an object. An object defined with a dimension list could be a variable, relation, formula, valueset, concat or conjoint dimension, dimension surrogate, or composite.

  • The name returned for an unnamed composite is the form used in the object definition: SPARSE<dim1 dim2 ...>.

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

  • When no dimension list was used when an object was defined, DFNDIMS returns NA.

DIMMAX

Returns an INTEGER value which is the number of values in a dimension. For other object types, DIMMAX returns 0 (zero). When you use the DIMMAX choice with a dimension that has a read permission that restricts access to the dimension values, the result that OBJ returns 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 command before using the OBJ function.

DIMS

Returns a multiline TEXT value that contains the names of the dimensions of an object:

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

  • For composites, it returns a multiline text value listing the base dimensions of the composite.

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

  • For other objects, it returns a multiline text value that contains the names of the dimensions of the object.

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

DIMTYPE

Returns one of the following TEXT values:

  • For a concat dimension, returns CONCAT.

  • For a conjoint dimension, returns, CONJOINT.

  • For a composite, returns, COMPOSITE.

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

  • For a partition template object, returns PARTITION TEMPLATE.

  • For all other objects, returns NA.

FORMULA

Returns a TEXT value which is the expression in the definition of a formula. When the object is not a formula, FORMULA returns NA.

HASCACHE variable-name

Returns a BOOLEAN value that indicates whether a session cache that is local to the session has been established to store data for variable-name which is a text expression that specifies the name of the variable. When variable-name is not a variable, HASCACHE returns NA. (For more information on the session cache, see "What is an Oracle OLAP Session Cache?".)

HASH

Returns a BOOLEAN value that indicates whether a conjoint dimension or a composite is using the HASH index algorithm to load and access data. For other types of objects, it returns NA.

HASPROPERTY prop-name

Returns a BOOLEAN value that indicates whether the property specified by prop-name exists for an object. (Abbreviated HASPRP)

HIDDEN program-name

Returns a BOOLEAN value that indicates whether the text of the program specified by program-name has been hidden. (See the entries for the HIDE and UNHIDE commands.) For other types of objects, it returns NA.

ISBY  [RECURSIVE] dimension-name [object-name]

When you supply both arguments returns a BOOLEAN value that answers the question: Is the specified object (object-name) dimensioned by or related to or a surrogate for the specified dimension (dimension-name)? Returns a BOOLEAN value that indicates whether an object is dimensioned by the dimension you specify in dimension-name; 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 dimension-name in the base dimensions of the specified object, at any level. the. See Example 19-1, "OBJ With ISBY " .

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

  • object-name is a text expression that 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

Returns a BOOLEAN value that indicates information about the compilation status of a 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.

For non-compilable objects, ISCOMPILED returns NA.

KVSIZE

Returns an INTEGER value which is the number of pages currently allocated to hash and BTREE indexes.

LD

Returns a TEXT value which is LD (long description) of an object. When the object does not have an LD, it returns NA.

MODEL

Returns a TEXT value which is the specification of a model. For other types of objects, it returns NA.

NOHASH

Returns a BOOLEAN value that indicates whether a conjoint dimension uses the NOHASH index algorithm to load and access data. For other types of objects, it returns NA.

NUMDFNDIMS

Returns an INTEGER value which is the number of dimensions or composites in the dimension list used to define an 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

Returns an INTEGER value which is one of the following depending on the type of object:

  • For a dimensioned object, the number of dimensions.

  • For all types of dimensions and dimension surrogates, NUMDIMS returns 1.

  • For a composite, it returns the number of base dimensions.

  • For objects with no dimensions, it returns 0 (zero).

NUMVALS

Returns an INTEGER value that is the number of values or cells in the 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). To retrieve the number of physical cells, use the PHYSVALS keyword.

OWNSPACE

Returns a BOOLEAN value that indicates whether a conjoint dimension or a composite is using private page space to store BTREE nodes, when that object is using the BTREE index algorithm. In addition, whether the data that is associated with a composite, a conjoint dimension, a variable-width text dimension, a relation, or a variable-width text variable is stored in one or more private page spaces that are associated with that object.

PARTBY

When name is the name of a partitioned variable or a partition template object, returns the names of the partition dimensions as a multiline text value (one line for each dimension). For all other object types, returns NA.

PARTDIMS partitions

When name is the name of a partition template or a partitioned variable, returns the names of the dimensions of the specified partitions as a multiline text value (one line for each dimension). For all other object types, returns NA.

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

When name is the name of a partitioned variable or a partition template object, returns a textual description of the specified partitions. 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. For all other object types, returns NA.

partitions is a multiline text value (one line for 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

When name is the name of a partition template or a partitioned variable, returns a text value that is the method (RANGE, LIST, or CONCAT) by which it is partitioned. For all other object types, returns NA.

PARTNAMES

When name is the name of a partition template, returns a multiline VARCHAR containing the names of all the defined partitions. When name is the name of a partitioned variable, returns a multiline VARCHAR containing the names of all the partitions of the variable. For all other object types, returns NA.


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.

PARTRANGE partitions [name]

When name is the name of a a RANGE partition template or a RANGE partitioned variable, returns the values of the LESS THAN clause for each of the specified partitions. The return value is a multiline text value (one line for each partition). For all other kinds of partition templates and partitioned variables and all other object types, returns NA.

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

For dimensions of type DAY, WEEK, MONTH, QUARTER, and YEAR, returns a TEXT value which is the type of the dimension plus an indication of multiple periods or phasing, if any. For objects other than DAY, WEEK, MONTH, QUARTER, or YEAR dimensions, it returns NA.

PHYSVALS

For a compressed composite or a variable dimensioned by a compressed composite, returns an INTEGER value that is the number of physical cells in the object. To retrieve the number of logical values, use the NUMVALS keyword.

PMTMAINTAIN

Returns a TEXT value which is the permission condition for the maintain permission associated with a dimension. When there is no maintain permission for the dimension, it returns NA.

PMTPERMIT

Returns a TEXT value which is the permission condition for the permit permission associated with an object. When there is no permit permission for the object, it returns NA.

PMTREAD

Returns a TEXT value which is the permission condition for the read permission associated with an object. When there is no read permission for the object, it returns NA.

PMTWRITE

Returns a TEXT value which is the permission condition for the write permission associated with an object. When there is no write permission for the object, it returns NA.

PRECISION

Returns an INTEGER value which is the precision of a 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

Returns a TEXT value which is the text of a program. For other types of objects, it returns NA.

PROPERTY prop-name

The value of the property 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. (See "Converting Values Returned by OBJ (PROPERTY)" for more information.) When the named property does not exist, it returns NA. See the PROPERTYTYPE argument. (Abbreviated PRP)

PROPERTYLIST

Returns a TEXT value which is a multiline text value that lists the properties associated with an 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

The data type of 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 command. 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)

REFERS  text-expression 

Returns a multiline TEXT value which is the words found in a 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.


  • Tip:

    When you omit object-name, use REPORT, rather than SHOW, to produce the output. Because the return value of OBJ(REFERS) is dimensioned by the NAME dimension, the REPORT command will return output for each object in the workspace.

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.

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.

SCALE

Returns an INTEGER value which is 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 {dimension-name | ALL} 

Returns a single or multiline TEXT value which is 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. When applied to an object other than a variable, this choice returns NA.

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

  • ALL specifies all dimensions.

SPARSE

Returns a TEXT value which is a multiline text value that lists the composites used in the definition of an object.

SURROGATELIST surrogate|dimension

Returns a TEXT value which is a multiline text value that lists the surrogates defined for a dimension. The object-name can be the name of a surrogate or a dimension. When no surrogates are defined for the dimension, then OBJ returns NA.

TRIGGER [triggering-event]

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

MAINTAIN
DELETE
PROPERTY
ASSIGN
BEFORE_UPDATE
AFTER_UPDATE

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

TYPE

Returns a TEXT value which is the object type of an object. Possible values include AGGMAP, COMPOSITE, DIMENSION, FORMULA, MODEL, OPTION, PARTITION TEMPLATE, PROGRAM, RELATION, SURROGATE, VALUESET, VARIABLE and WORKSHEET.

VNF

Returns a TEXT value which is the VNF (value name format) of a dimension of type DAY, WEEK, MONTH, QUARTER, or YEAR. For other types of objects, and for DAY, WEEK, MONTH, QUARTER, and YEAR dimensions with no VNF, it returns NA.

WIDTH

Returns an INTEGER value which is the width, in bytes, of the storage area of each value of an 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 an integer 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.

Notes


Matching the Case of the Return Value

When you are checking the value returned by OBJ in a Boolean expression, you must be careful to check for the exact value returned by the OBJ function. This means you must match uppercase and lowercase exactly. For example, OBJ(DATA) returns the data type in uppercase.

OBJ(DATA) EQ 'INTEGER'

This is particularly important when you are limiting NAME to a particular group of objects. See Example 19-4, "Using OBJ to Select Objects".


Converting Values Returned by OBJ (PROPERTY)

The return value of OBJ(PROPERTY) is like a worksheet value whose data type is determined at runtime. In some cases, the statement calling OBJ(PROPERTY) makes assumptions about its return value. In the following example, market is a dimension of TEXT values and max is a property with an INTEGER value.

LIMIT market TO OBJ(PROPERTY 'max' 'market')

Because the data type of the property is not the same data type as the dimension, the LIMIT command produces an error message stating that the return value is not a valid dimension value. To solve this problem, use the CONVERT function.

LIMIT market TO CONVERT(OBJ(PROPERTY 'max' 'market') INTEGER)

Examples

Example 19-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 19-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 19-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 19-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 19-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 19-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 19-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 19-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
    ...