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

PUSH

The PUSH command saves the current status of a dimension, the status of a valueset, or the value of an option or single-cell variable. You can then restore these saved values and status at a later time with a POP command.

PUSH and POP are commonly used within a program to make changes to options and dimension status that apply only during the program's execution. Afterward, the options and status are the same as they were before the execution of the program.


See also:

the following related commands:

Syntax

PUSH name1 [name]

Arguments

name

The name of a dimension, valueset, option, or variable whose status or value you want to save.

Notes


NAME Dimension

PUSH and POP also work for the NAME dimension.


Effect of the MAINTAIN Command

Using the MAINTAIN command with a dimension clears that dimension's pushed status lists. For example, suppose you have pushed the dimension month several times, with different limits each time. When you then use the MAINTAIN command to perform any maintenance activity on the month dimension, Oracle OLAP resets the status of month to ALL (the default), and popping that dimension will have no effect.

Examples

Example 19-44 Saving and Restoring Values

The following program uses PUSH and POP to produce sales figures without decimal places for a specific selection of products, districts, and months, and then restores the status settings and the value of DECIMALS to what they were before the program was run.

DEFINE report1 PROGRAM
PROGRAM
TRAP ON cleanup
PUSH DECIMALS product district month
 
DECIMALS = 0
LIMIT product TO 'Sportswear' 'Footwear'
LIMIT district TO 'Atlanta' 'Dallas'
LIMIT month TO 'Jan96' TO 'Jun96'
REPORT sales
 
cleanup:
POP DECIMALS product district month
END