<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="en-us" xml:lang="en-us"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="security" content="public" /> <meta name="Robots" content="index,follow" /> <meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' /> <meta name="DC.Type" content="task" /> <meta name="DC.Title" content="Display the call stack" /> <meta name="abstract" content="You can use the Display Debug (DSPDBG) command to display the call stack." /> <meta name="description" content="You can use the Display Debug (DSPDBG) command to display the call stack." /> <meta name="DC.subject" content="call stack, description, stack, call, program, call, stack, level, nesting" /> <meta name="keywords" content="call stack, description, stack, call, program, call, stack, level, nesting" /> <meta name="DC.Relation" scheme="URI" content="opm.htm" /> <meta name="DC.Relation" scheme="URI" content="pgmac.htm" /> <meta name="DC.Relation" scheme="URI" content="cflow.htm" /> <meta name="DC.Relation" scheme="URI" content="../cl/dspdbg.htm" /> <meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" /> <meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" /> <meta name="DC.Format" content="XHTML" /> <meta name="DC.Identifier" content="pgmin" /> <meta name="DC.Language" content="en-us" /> <!-- All rights reserved. Licensed Materials Property of IBM --> <!-- US Government Users Restricted Rights --> <!-- Use, duplication or disclosure restricted by --> <!-- GSA ADP Schedule Contract with IBM Corp. --> <link rel="stylesheet" type="text/css" href="./ibmdita.css" /> <link rel="stylesheet" type="text/css" href="./ic.css" /> <title>Display the call stack</title> </head> <body id="pgmin"><a name="pgmin"><!-- --></a> <!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script> <h1 class="topictitle1">Display the call stack</h1> <div><p>You can use the <span class="cmdname">Display Debug (DSPDBG)</span> command to display the call stack.</p> <div class="section"> <p>The call stack indicates: </p> <ul><li>Which programs are currently being debugged</li> <li>The instruction number of the calling instruction or the instruction number of each breakpoint at which program processing is stopped</li> <li>The program recursion level</li> <li>The names of the programs that are in debug mode but have not been called</li> </ul> <p>A call of a program is the allocation of <em>automatic</em> storage for the program and the transfer of machine processing to the program. A series of calls is placed in a call stack. When a program finishes processing or transfers control, it is removed from the call stack.</p> <p>A program may be called a number of times while the first call is still in the call stack. Each call of a program is a recursion level of the program.</p> <p>When a call is ended (the program returns or transfers control), automatic storage is returned to the system. </p> <div class="note"><span class="notetitle">Note:</span> <ol><li>CL programs can be recursive; that is, a CL program can call itself either directly or indirectly through a program it has called.</li> <li>Some high-level languages do not allow recursive program calls. Other languages allow not only programs to be recursive, but also procedures within a program to be recursive. (In this guide, the term <em>recursion level</em> refers to the number of times the program has been called in the call stack. A procedure's recursion level is referred to explicitly as the procedure recursion level.)</li> <li>All CL commands and displays make use of only the program qualified name recursion level.</li> </ol> </div> </div> </div> <div> <ul class="ullinks"> <li class="ulchildlink"><strong><a href="pgmac.htm">Program activations</a></strong><br /> An activation of a program is the allocation of static storage for the program.</li> </ul> <div class="familylinks"> <div class="parentlink"><strong>Parent topic:</strong> <a href="opm.htm" title="You can debug your OPM programs by using testing functions.">Debug OPM programs</a></div> </div> <div class="reltasks"><strong>Related tasks</strong><br /> <div><a href="cflow.htm" title="You can use the Call Program (CALL), Call Bound Procedure (CALLPRC), and Return (RETURN) commands to pass control back and forth between programs and procedures.">Control flow and communicate between programs and procedures</a></div> </div> <div class="relinfo"><strong>Related information</strong><br /> <div><a href="../cl/dspdbg.htm">Display Debug (DSPDBG) command</a></div> </div> </div> </body> </html>