ibm-information-center/dist/eclipse/plugins/i5OS.ic.rbam6_5.4.0.1/eval.htm

112 lines
7.0 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?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="reference" />
<meta name="DC.Title" content="Display variables" />
<meta name="abstract" content="You can display the value of variables using the Display Module Source display or the EVAL debug command." />
<meta name="description" content="You can display the value of variables using the Display Module Source display or the EVAL debug command." />
<meta name="DC.subject" content="variable, displaying" />
<meta name="keywords" content="variable, displaying" />
<meta name="DC.Relation" scheme="URI" content="dbgile.htm" />
<meta name="DC.Relation" scheme="URI" content="dsplogvar.htm" />
<meta name="DC.Relation" scheme="URI" content="dspcharvar.htm" />
<meta name="DC.Relation" scheme="URI" content="dspdecvar.htm" />
<meta name="DC.Relation" scheme="URI" content="dsphexvar.htm" />
<meta name="DC.Relation" scheme="URI" content="dbpgm.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="eval" />
<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 variables</title>
</head>
<body id="eval"><a name="eval"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Display variables</h1>
<div><p>You can display the value of variables using the Display Module
Source display or the EVAL debug command. </p>
<div class="section"><p>To display a variable using the Display Module Source display
, place your cursor on the variable that you want to display and press F11
(Display variable). The current value of the variable is shown on the message
line at the bottom of the Display Module Source display.</p>
<div class="fignone" id="eval__dspvar"><a name="eval__dspvar"><!-- --></a><span class="figcap">Figure 1. Display a Variable using F11 (Display variable)</span><pre class="screen"> <strong>Display Module Source</strong>
Program: DSPWKDAY Library: MYLIB Module: DSPWKDAY
4 DCL VAR(&amp;MSGTEXT) TYPE(*CHAR) LEN(20)
5 CALL PGM(WEEKDAY2) PARM(&amp;DAYOFWK)
6 IF COND(&amp;DAYOFWK *EQ 1) THEN(CHGVAR +
<strong> 7</strong> <strong> VAR(&amp;WEEKDAY) VALUE('Sunday'))</strong>
8 ELSE CMD(IF COND(&amp;DAYOFWK *EQ 2) THEN(CHGVAR +
9 VAR(&amp;WEEKDAY) VALUE('Monday')))
10 ELSE CMD(IF COND(&amp;DAYOFWK *EQ 3) THEN(CHGVAR +
11 VAR(&amp;WEEKDAY) VALUE('Tuesday')))
12 ELSE CMD(IF COND(&amp;DAYOFWK *EQ 4) THEN(CHGVAR +
13 VAR(&amp;WEEKDAY) VALUE('Wednesday')))
14 ELSE CMD(IF COND(&amp;DAYOFWK *EQ 5) THEN(CHGVAR +
15 VAR(&amp;WEEKDAY) VALUE('Thursday')))
16 ELSE CMD(IF COND(&amp;DAYOFWK *EQ 6) THEN(CHGVAR +
17 VAR(&amp;WEEKDAY) VALUE('Friday')))
18 ELSE CMD(IF COND(&amp;DAYOFWK *EQ 7) THEN(CHGVAR +
<strong> More...</strong>
Debug . . . <strong><em></em></strong>
<strong><em></em></strong>
F3=End program F6=Add/Clear breakpoint F10=Step F11=Display variable
F12=Resume F17=Watch Variable F18=Work with watch F24=More keys
<strong>&amp;DAYOFWK = 3.</strong><strong></strong></pre>
</div>
</div>
<div class="section"><div class="p">You can also use the EVAL debug command to determine the value
of a variable. To display the value of a variable using the EVAL debug command,
type the following on the debug command line: <pre>EVAL variable-name</pre>
</div>
<p><span class="synph"><span class="var">Variable-name</span></span> is
the name of the variable that you want to display. The value of the variable
is shown on the message line if the EVAL debug command is entered from the
Display Module Source display and the value can be shown on a single line.
If the value cannot be shown on a single line, it is shown on the Evaluate
Expression display.</p>
<p>For example, to display the value of the variable <span class="synph"><span class="var">&amp;DAYOFWK</span></span>;
on line 7 of the module object shown in the example above, type: </p>
<pre>EVAL &amp;DAYOFWK</pre>
<p>The message line of the Display Module Source display shows <samp class="codeph">&amp;DAYOFWK
= 3.</samp> as in the example above.</p>
<p>The scope of the variables used
in the EVAL command is defined by using the QUAL command. However, you do
not need to specifically define the scope of the variables contained in a
CL module because they are all of global scope.</p>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="dsplogvar.htm">Example: Display logical variable</a></strong><br />
This example uses the EVAL debug command to display the value of logical variables.</li>
<li class="ulchildlink"><strong><a href="dspcharvar.htm">Examples: Display character variable</a></strong><br />
This example uses the EVAL debug command to display the value of character variables.</li>
<li class="ulchildlink"><strong><a href="dspdecvar.htm">Example: Display decimal variable</a></strong><br />
This example uses the EVAL debug command to display the value of decimal variables.</li>
<li class="ulchildlink"><strong><a href="dsphexvar.htm">Example: Display Variables as hexadecimal values</a></strong><br />
You can use the EVAL debug command to display the value of variables in hexadecimal format.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dbgile.htm" title="You can debug your ILE programs by using the ILE source debugger.">Debug ILE programs</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="dbpgm.htm" title="Many debug commands are available for use with the ILE source debugger.">Debug commands</a></div>
</div>
</div>
</body>
</html>