DATASESSIONLEVEL()
From Lianjapedia
Revision as of 06:09, 19 March 2018 by Yvonne.milne (Talk | contribs)
Contents
Purpose
Return the current data session level
Syntax
DATASESSIONLEVEL()
See Also
DOLEVEL(), LEVEL(), POP DATASESSION, PUSH DATASESSION, RESTORE DATASESSION, RESTORE RECORDVIEW, SAVE DATASESSION, SAVE RECORDVIEW
Description
The DATASESSIONLEVEL() functions is used to return the current data session level. It works in conjunction with the commands PUSH DATASESSION and POP DATASESSION used to save and restore a data session respectively. Data sessions can be pushed and popped up to 256 levels deep and operate on a last in, first out basis. All tables are closed by the PUSH DATASESSION command.
The SAVE DATASESSION and RESTORE DATASESSION commands can also be used to save and restore the current data session, optionally saving and restoring from a memory variable.
Example
? datasessionlevel() // returns 0 // save the current data session push datasession ? datasessionlevel() // returns 1 // Carry out other operations with different data // then save this second data session push datasession ? datasessionlevel() // returns 2 // Carry out other operations with different data // then restore the second data session pop datasession ? datasessionlevel() // returns 1 // Carry out other operations with different data // then restore the original data session pop datasession ? datasessionlevel() // returns 0