CRE Programmer's Guide
CRE Service Functions
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
6-47
CRE_Stacktrace_
stack_mark
(TNS CRE only) if present, specifies the L-register word of the first stack marker to
display in the stack trace. If
stack_mark is not present, reporting begins with the
caller of the caller of CRE_Stacktrace_.
Return Value
CRE_Stacktrace_ returns one of the following:
•
0 if the input operation is successful
•
A positive number, which is a file system error number
•
A negative number, which is the negation of a CRE error number from the following
table:
Considerations
•
If a line of stack trace is longer than the record size for the output device,
CRE_Stacktrace_ breaks the message over as many lines as necessary.
•
CRE_Stacktrace_ retries errors that are recoverable.
•
CRE_Stacktrace_ begins examining the names of procedures on the stack
beginning with the current procedure—the most-recently called procedure. From
the current procedure, it begins scanning stack frames until it encounters a
procedure name that does not end in an underscore character (_). When
CRE_Stacktrace_ encounters a procedure name that does not end in an
underscore, it writes the stack information for that procedure to the file specified by
file_ordinal. Thereafter, CRE_Stacktrace_ includes all procedures in the stack
trace, including procedures whose names end in an underscore.
-1
Do not include prefix bytes with any line of stack trace.
0
Do not include prefix bytes with any line of stack trace.
> 0
Include the first prefix_bytes of buffer:buffer_bytes on
the first line of stack trace and prefix_bytes blanks on each
subsequent line of stack trace.
Error Code Cause
56 Invalid parameter value
63 Undefined shared file
64 File not open
prefix_bytes
Meaning (continued)