When a java application crashes, you usually get a java stack trace in the output. For a COBOL developer this could be time consuming to decipher and map to the COBOL program. To make it simpler to interpret, Elastic COBOL provides a COBOL stack trace so that the location of the crash can be identified in the program and quickly resolved. This trace information is output prior to the java stack trace.
In order to output the COBOL stack trace, the runtime requires that the location of the SMAP files be provided. This should be done using the environment variable "SMAP_DIR".
NOTE: SMAP files are only created during compilation if the -run:tracestack compiler option is given.
You can provide multiple paths to the SMAP_DIR using the system file path separator.
For e.g. set SMAP_DIR = C:\holder1;C:\holder2
On the Eclipse IDE, this environment variable is set by default to the intermediate_java_code of the current project . One can always override this by providing the environment variable in the launch configuration.
If the SMAP_DIR variable is not set , a message is output indicating that the COBOL stack trace is not available.
The COBOL stack is provided only for those programs for which the SMAP can be located.
In the Eclipse IDE, the COBOL stack trace is in the form of hyperlinks. Clicking on the links will open the corresponding source and position the editor to the line.
0 Comments