DDL Command MODE
The MODE Command
MODE is used to override standard session defaults and establish your own operational status for all of, or some part of, a session. In every case below, the first choice shown in any choice (choices are separated with a /) list is the default assumed when no MODE has been specified.
Syntax:
Options:
|
X - Suppress the command response
Y - Do not alter the command answer cells
|
Answers:
%Answer1=Current settings if no arguments are given. See Notes.
%Answer2=Zero
%Answer3=Zero
Notes:
MODE is set up so that it is easy to save current settings for some MODEs, establish temporary new settings, and then revert back to the old settings.
The technique is as follows: Invoke any of the MODEs with no arguments and the current setting is returned in the %answer cell. So you can save it in a variable and then use that variable later to restore the given MODE to it's previous setting. For example:
mode dateform @ Current DATEFORM saved
set %oldsetting=%Answer1 @ in %oldsetting
mode dateform "new-template" @ New DATEFORM established
:
(Something using new DATEFORM)
:
mode {%oldsetting} @ Previous setting restored
The above does not apply for MODE CBUFF, MODE HFILE or MODE HELP.
Generally, anytime you change a MODE from its default status it retains its new setting until the end of the session unless you explicitly change it back. There are three exceptions to this: MODE ESC, MODE RESTART, and MODE STOP are all reset to default status if you do an OPEN. So after any OPEN you must reestablish these if you want something other than the default.
However, if you have specified the desired state for these in a CONFIG
file, then they will have that state after an OPEN.