![]() Previous |
![]() Next |
The INFO (MODEL) function obtains information that is produced for the models in your analytic workspace and stored internally by Oracle OLAP. Through the use of keywords, INFO lets you extract specific pieces of information about the structure of a compiled model or the status of a model that you have run in your current session.
Note: Before using INFO, familiarize yourself with the reports created by MODEL.COMPRPT, MODEL.DEPRT, and MODEL.XEQRPT that might give you all the information you need. |
Use INFO with the keyword AVAILABLE to determine whether any model results are currently available. When you try to extract any other information without having considered or defined a model in your current session, INFO produces an error.
Return Value
The return value depends on the keyword you use, as described in the tables in this entry. INFO returns NA
when you use an index that is out of range or when you request information that is not relevant. For example, if the model contains 5 statements and you request information about statement 6, INFO returns NA
; or if you specify the DIMENSION REFERENCE choice when the assignment target is actually a variable, INFO returns NA
.
Syntax
INFO(MODEL choice [index1 [index2 [index3]]])
where index is an argument specifies the result you want for a choice that can have several different results. Depending on the keyword choice, you can supply one or more of the following index arguments:
Parameters
Indicates that you want to obtain information about a model in your analytic workspace. INFO returns information about the model that you have most recently defined or considered in the current session (see the DEFINE MODEL and CONSIDER commands).
A keyword that specifies the information you want. The choices available for models are listed in the following tables that represent different informational categories:
Table: INFO (MODEL) Choices to Retrieve General Information About the Model.
Table: INFO (MODEL) Choices to Retrieve Information about the Structure of the Model.
Table: INFO (MODEL) Choices to Retrieve Information about Target, Sources, and Dependencies. These choices provide information about statements that are equations. Equations have the form assignment target = expression. The expression can refer to one or more data sources. Assignment targets and data sources can be either variables or dimension values, and they can have qualifiers that affect their dimensionality.
Table: INFO (MODEL) Choices to Retrieve Information About Execution Status. All of these choices (except XEQSTATUS) are relevant only after running a model with a simultaneous block. When the current model has not been compiled, Oracle OLAP returns an error when you use any choice except AVAILABLE or NAME.
Each table consists of four columns that provide the following information: keyword, data type of returned value; index argument associated with the keyword; and meaning.
INFO (MODEL) Choices to Retrieve General Information About the Model
Keywords | Data Type | Index Arguments | Meaning |
---|---|---|---|
AVAILABLE |
BOOL |
(No arguments) |
Is there a model for which information is available? |
NAME |
TEXT |
[MODEL model-num] |
Without model-num (or with model-num equal to 0), the name of the current model. With model-num greater than 0, the name of the included model that is the specified model-num within the current model. |
COUNT STATEMENTS |
INT |
(No arguments) |
The number of statements in the current model. The count includes comments, equations, and DIMENSION and INCLUDE commands (if any), it but does not include the statements in an included model. |
STATEMENT |
TEXT |
stmnt-num |
The text of statement stmnt-num. |
SIMULTANEOUS |
BOOL |
(No arguments) |
Does the current model contain a simultaneous block? |
INFO (MODEL) Choices to Retrieve Information about the Structure of the Model
Keyword(s) | Data Type | Index Argument(s) | Meaning |
---|---|---|---|
COUNT ELEMENTS |
INT |
[BLOCK block-num] |
Without block-num, the number of blocks in the current model. With block-num, the total number of statements and nested blocks within block block-num in the current model. When you request further information about a particular element (for example, with the TYPE ELEMENT choice), you always specify the block number to which the element belongs and the number of the element within that block. |
TYPE ELEMENT |
TEXT |
element-num BLOCK block-num |
Returns BLOCK or STATEMENT, depending on whether element element-num of block block-num is a nested block or a statement. |
NUMBER BLOCK |
INT |
element-num BLOCK block-num |
The block number of the nested block that is element element-num of block block-num. |
TYPE BLOCK |
TEXT |
block-num |
Returns SIMPLE, STEP-FORWARD, STEP-BACKWARD, or SIMULTANEOUS, depending on the execution type of block block-num. |
COUNT DIMS |
INT |
[BLOCK block-num] |
Without block-num, the number of model dimensions of the current model. With block-num, the number of step-forward, step-backward, or simultaneous dimensions of block block-num within the current model. |
DIMENSION |
TEXT |
dimension-num [BLOCK block-num] |
Without block-num, the name of model dimension dimension-num of the current model. With block-num, the name of the specified step-forward, step-backward, or simultaneous dimension of block block-num. |
NUMBER STATEMENT |
INT |
element-num BLOCK block-num |
The statement number of the statement that is element element-num of block block-num. The statement number refers to the position of the statement within its own model. To request further information about the statement (for example, with the HIDDEN choice), its model must be the model that you are currently considering. |
HIDDEN |
BOOL |
stmnt-num |
Has statement stmnt-num been masked by a subsequent statement? |
NUMBER MODEL |
INT |
element-num BLOCK block-num
|
The number of the included model from which the statement that is element element-num of block block-num is taken.
|
INFO (MODEL) Choices to Retrieve Information about Target, Sources, and Dependencies
Keyword(s) | Data Type | Index Argument | Meaning |
---|---|---|---|
COUNT SOURCES |
INT |
STATEMENT stmnt-num |
The number of data sources in statement stmnt-num within the current model. |
TYPE REFERENCE |
TEXT |
STATEMENT stmnt-num [SOURCE source-num] |
Without source-num, the object type of the assignment target of statement stmnt-num. With source-num, the object type of data source source-num in statement stmnt-num. The object type is VARIABLE when the reference is to a variable. The type is DIMENSION when the reference is to the value of a dimension. |
VARIABLE REFERENCE |
TEXT |
STATEMENT stmnt-num [SOURCE source-num] |
Without source-num, the name of the variable that is the assignment target of statement stmnt-num. With source-num, the name of the variable that is data source source-num in statement stmnt-num. |
VALUE REFERENCE |
TEXT |
STATEMENT stmnt-num [SOURCE source-num] |
Without source-num, the dimension value that is the assignment target of statement stmnt-num. With source-num, the dimension value that is data source source-num in statement stmnt-num. |
DIMENSION REFERENCE |
TEXT |
STATEMENT stmnt-num [SOURCE source-num] |
Without source-num, the model dimension of the target dimension value in statement stmnt-num. With source-num, the model dimension of source dimension value source-num in statement stmnt-num. |
COUNT QUALIFIERS |
INT |
STATEMENT stmnt-num [SOURCE source-num] |
Without source-num, the number of qualifiers of the assignment target in statement stmnt-num. With source-num, the number of qualifiers of data source source-num in statement stmnt-num. |
TYPE QUALIFIER |
TEXT |
qualifier-num STATEMENT stmnt-num [SOURCE source-num] |
Without source-num, the qualifier type of qualifier qualifier-num of the target of statement stmnt-num. With source-num, the qualifier type of qualifier qualifier-num of data source source-num in statement stmnt-num. The qualifier type can indicate dimensional dependence: LAG (previous dimension values only), LEAD (later values only), BOTH (both previous and later values), and VARIABLE (either previous or later values, depending on the value of a variable when the model is run). The qualifier type can also be QDR (qualified data reference). |
DIMENSION QUALIFIER |
TEXT |
qualifier-num STATEMENT stmnt-num [SOURCE source-num] |
qualifier-num STATEMENT stmnt-num [SOURCE source-num] Without source-num, the dimension of qualifier qualifier-num of the assignment target in statement stmnt-num. With source-num, the dimension of qualifier qualifier-num of data source source-num in statement stmnt-num. |
INFO (MODEL) Choices to Retrieve Information About Execution Status
Keyword(s) | Data Type | Index Argument | Meaning |
---|---|---|---|
XEQSTATUS |
TEXT |
[BLOCK block-num] |
Without block-num, the execution status of the model as a whole; when the model has not been run, the status is NOT EXECUTED. With block-num, the execution status of block block-num; when the model has not been run, an error is returned. When the model has been run, the status for the model as a whole or for a block can be SOLVED, DIVERGED, or FAILED TO CONVERGE. The status of an outer-level block can be EXECUTION INCOMPLETE when a nested block within it diverged or failed to converge. |
COUNT ITERATIONS |
INT |
BLOCK block-num |
The number of iterations that were performed for block block-num before it was solved or it diverged or failed to converge. |
DAMP |
DEC |
(No arguments) |
The value of the MODDAMP option when the model was run. (Relevant only when the solution method is GAUSS.) |
DIVERGSTMT |
INT |
BLOCK block-num |
The element number of the statement that diverged during the calculations for block block-num. |
GAMMA |
INT |
(No arguments) |
The value of the MODGAMMA option when the model was run. |
MAXITERS |
INT |
(No arguments) |
The value of the MODMAXITERS option when the model was run. |
OVERFLOW |
INT |
(No arguments) |
The value of the MODOVERFLOW option when the model was run. |
SIMULTYPE |
TEXT |
(No arguments) |
The value of the MODSIMULTYPE option when the model was run: AITKENS or GAUSS. |
TOLERANCE |
INT |
(No arguments) |
The value of the MODTOLERANCE option when the model was run. |
An INTEGER expression that specifies the block for which you want information. Block-num corresponds to the block numbers that are identified in the report produced by the MODEL.COMPRPT program.
An INTEGER expression that specifies the model dimension or block dimension for which you want information. For the model as a whole, the first dimension listed for the model is dimension-num 1, and so on. For example, assume that the MODEL.COMPRPT specifies the model dimensions as <line month>
. In this case, line
is dimension-num 1
and month
is dimension-num 2
. For a simultaneous block in the current model, the first dimension of the block is dimension-num 1
, and so on. A step-forward or step-backward block has a single dimension, so the dimension of the block is always dimension-num 1
. To see a list of the dimensions for the model as a whole and for each block of the model, you can run the MODEL.COMPRPT program.
An INTEGER expression that specifies the element for which you want information. When you request information about an element, you always specify the block number to which the element belongs. An element is either a statement in the specified block, or it is a nested block within the specified block. The element numbers correspond to the order of the statements and blocks in the compiled model. You can run the MODEL.COMPRPT program to see the list of elements in the compiled model.
For example, suppose the current model has the following compiled structure.
block 1 statement a block 2 statement b statement c END block 2 statement d END block 1
When you request information about block
1
in the preceding model, statement
a
is element-num 1
; block
2
is element-num 2
; and statement
d
is element-num 3
. When you request information about block
2
, statement
b
is element-num 1
and statement
c
is element-num 2
.
For a hierarchy of included models, an INTEGER expression that specifies the model for which you want information. The model you are currently considering is model-num 0
(zero), the model it includes is model-num 1
, and so on. The root model has the highest model number in the hierarchy.
An INTEGER expression that specifies the qualifier for which you want information. Qualifiers change the dimensionality of a variable or dimension value reference. The reference can be qualified by a function, such as LAG, LEAD, or TOTAL or by a qualified data reference (QDR). To see the qualifiers for a statement, you can run the MODEL.DEPRT program for the model that contains the statement.
For each equation in the model, the MODEL.DEPRT report lists the assignment target and its qualifiers on one line, followed by the data sources. Each data source is listed on a separate line, together with its qualifiers. The MODEL.DEPRTreport also specifies the type of each qualifier: LAG, LEAD, BOTH, VARIABLE, or QDR (see the TYPE QUALIFIER choice in the third group of INFO keyword choices).
For the target and each source, qualifier-num corresponds to the order in which the qualifiers are listed in the MODEL.DEPRT report.
An INTEGER expression that specifies the data source for which you want information. In a calculation, each reference to a variable or a dimension value is counted as a source of data for the assignment target. A constant value is not counted as a source.
To see the data sources in a statement, you can run the MODEL.DEPRT program for the model that contains the statement. For each equation in the model, the MODEL.DEPRT report lists the assignment target on one line, followed by its data sources. Each data source is listed on a separate line.
An INTEGER expression that specifies the statement for which you want information. Stmnt-num always refers to a statement from the model you are currently considering. It does not refer to a statement taken from an included model.
To see the statement numbers in the current model, you can run the MODEL.COMPRPT program. To the left of each statement, the report lists the model from which the statement is taken and the statement number within that model.
Examples
Getting Qualifier Information
Assume that the following statement is statement 3 of a model called income.plan
.
budget(line revenue) = LAG(actual(line revenue), 1, month) - + plan.factor
You can run the MODEL.DEPRPT
program to see the qualifiers of the target and sources in this statement.
MODEL.DEPRPT income.plan
This statement produces the following output.
MODEL INCOME.PLAN ... 3 BUDGET(QDR <LINE>): ACTUAL(LAG <MONTH>)(QDR <LINE>) PLAN.FACTOR ...
This report shows that the assignment target, budget
, has two data sources, actual
and plan.factor
.
Checking Qualifier Information
The following statements make INCOME.PLAN the current model and check the number and type of the qualifiers of the assignment target of statement 3.
CONSIDER income.plan SHOW INFO(MODEL COUNT QUALIFIERS STATEMENT 3)
These statements produce the following output.
1
The OLAP DML statement
SHOW INFO(MODEL TYPE QUALIFIER 1 STATEMENT 3)
produces the following output.
QDR
Checking Different Data Sources
The following statements check the number and type of the qualifiers of the two data sources in statement 3.
The OLAP DML statement
SHOW INFO(MODEL COUNT QUALIFIERS STATEMENT 3 SOURCE 1)
produces the following output.
2
The OLAP DML statement
SHOW INFO(MODEL TYPE QUALIFIER 1 STATEMENT 3 SOURCE 1)
produces the following output.
LAG
The OLAP DML statement
SHOW INFO(MODEL TYPE QUALIFIER 2 STATEMENT 3 SOURCE 1)
produces the following output.
QDR
The OLAP DML statement
SHOW INFO(MODEL COUNT QUALIFIERS STATEMENT 3 SOURCE 2)
produces the following output.
0