|Oracle® OLAP DML Reference
10g Release 1 (10.1)
Part Number B10339-02
The POPLEVEL command restores all values saved with PUSH commands that were executed since the last POPLEVEL command specifying the same marker.
You must use PUSHLEVEL to mark a starting point for a series of PUSH commands before you can use POPLEVEL to restore the saved values. POPLEVEL itself marks the end of the series. You can use POPLEVEL only within programs. (Abbreviated PPL.)
POPLEVEL marker-expression [DISCARD]
A text value used as a marker. This must be exactly the same as the value used in the corresponding PUSHLEVEL command to mark the start of a series of saved values being popped.
Specifies that the pushed values for that level are discarded when you issue the POPLEVEL command. When you do not specify DISCARD, the values that were pushed are used to reset the pushed objects.
Two possible uses for the POPLEVEL command are:
After a single extremely long and complicated PUSH command, or a series of short ones given throughout a program, that may need a lot of editing. PUSHLEVEL and POPLEVEL allow you to edit the arguments for a long and complicated PUSH command without also having to edit a corresponding long and complicated POP command.
You can nest PUSHLEVEL and POPLEVEL pairs, as long as you specify a different marker for each pair.
When you specify the same marker for two or more PUSHLEVEL commands, a POPLEVEL command specifying that same marker will restore values that were saved only since the most recent PUSHLEVEL command.
When you specify a different marker for two or more PUSHLEVEL commands, a POPLEVEL command that specifies the marker of any PUSHLEVEL command restores all the values that were saved since that command, including values that were saved after later PUSHLEVEL commands.
To see a sample program using POPLEVEL, see the PUSHLEVEL example.