C$ENVMAP
The C$ENVMAP library routine saves or restores a subset of environment variables. Information is saved to a stack, the routine can be called recursively.
Syntax:
 CALL "C$ENVMAP" USING opCode 
                      [status]
Parameters:
opCode
PIC 9(1)
Specifies the operation to be performed. Valid values are:
 
1 Save variables
0 Restore variables
status
PIC S99 COMP-1.
Receives the function status:
 
1 Operation completed successfully.
0 Operation failed.
Examples:
Example - Backup the environment, then change one variable temporarily, then restore the value from backup
set environment "tempdatapath" to "/myapp/data/temp1"
call "c$envmap" using 1 *> save environment
set environment "tempdatapath" to "/myapp/data/temp2"
accept path-to-temp-data from environment "tempdatapath"
*> path-to-temp-data will be /myapp/data/temp2
call "c$envmap" using 0 *> restore environment
accept path-to-temp-data from environment "tempdatapath"
*> path-to-temp-data will be /myapp/data/temp1