Guardian Procedure Calls Reference Manual

Considerations
The new-value and old-value parameters correspond to the DEFMODE attribute of a
process:
DEFMODE OFF corresponds to value 0.
DEFMODE ON corresponds to value 1.
If new-value is not supplied, the call to DEFINEMODE does not change the current value of
DEFINE mode.
When a process is created, the DEFINE mode for the new process can be supplied as an
option to PROCESS_CREATE_, PROCESS_SPAWN_, NEWPROCESS, NEWPROCESSNOWAIT,
OSS tdm_fork(), OSS tdm_spawn() or one of the OSS tdm_exec set of functions, or
to the command interpreter RUN command. The default is the DEFINE mode of the caller of
the procedure that creates the new process or that of the command interpreter.
The DEFMODE of a primary process is checkpointed to the corresponding backup process
whenever the primary process calls CHECKPOINT or CHECKPOINTMANY to checkpoint the
data stack.
For details on DEFINE mode and its effects, see the Guardian Programmer's Guide.
Example
INT previous^use;
LITERAL define^mode=1;
.
.
.
error := DEFINEMODE( define^mode, previous^use );
IF error <> DEOK THEN ...
! The above statements enable DEFINE use and return
! the previous DEFINE mode in the variable
! previous^use.
Related Programming Manual
For programming information about the DEFINEMODE procedure, see the Guardian Programmer's
Guide.
DEFINEMODE Procedure 271