Dump
The DUMP command writes internal macro processor information to a text file for debugging purposes.
DUMPkeyfilename
key
Specifies the type of internal macro processor information to dump. Allowed values are:
COMMANDS
List of all available macro commands (the first keyword of each).
MACROS
List of all macros currently loaded in memory.
STACK
List of all macros and subMacros currently on the stack.
GLOBALS
List of all variables defined with a global scope.
LOCALS
Currently defined local variables of the macro in which the DUMP command has been used.
FUNCTIONS
List of all defined IML functions.
filename
(string) Location and filename of the DUMP text file. If you specify a new filename, a new file will be created. If you specify an existing filename, the new DUMP information will be appended to the end of the existing file. (Existing DUMP files in the specified location are not overwritten.)
MACRO Dump_all
DEFINE sOut AS string
sOut = "C:\IML_dump.txt"
FNEW sOut
FWRITE sOut "----- Loaded macros: -----"
DUMP MACROS sOut
FWRITE sOut "----- Call stack: -----"
DUMP STACK sOut
FWRITE sOut "----- Global variables: -----"
DUMP GLOBALS sOut
FWRITE sOut "----- Local variables: -----"
DUMP LOCALS sOut
END MACRO
After this example Dump_all macro executes, the file IML_dump.txt could contain the following information:
----- Loaded macros: -----
Macro Dump_all
----- Call stack: -----
----- Global variables: -----
----- Local variables: -----
String: sOut = "C:\IML_dump.txt"