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

70 lines
4.6 KiB
HTML

<?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="concept" />
<meta name="DC.Title" content="Use the most recently called procedure as a base" />
<meta name="abstract" content="You can specify the most recently called procedure as the base call stack entry by using the *PGMNAME special value." />
<meta name="description" content="You can specify the most recently called procedure as the base call stack entry by using the *PGMNAME special value." />
<meta name="DC.Relation" scheme="URI" content="callid.htm" />
<meta name="DC.Relation" scheme="URI" content="callcontrolasbase.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="callrecentasbase" />
<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>Use the most recently called procedure as a base</title>
</head>
<body id="callrecentasbase"><a name="callrecentasbase"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Use the most recently called procedure as a base</h1>
<div><p>You can specify the most recently called procedure as the base
call stack entry by using the *PGMNAME special value. </p>
<div class="p">Although you may not know the name of a procedure, you may want to send
a message back to the most recently called procedure of an ILE program. The
special value *PGMNAME is used with a ILE program name to use the base entry
name as the name for the most recently called procedure of the identified
program. The programs in this example are: <ul><li>CLPGM51 is an ILE program with procedures PROCA and PROCB.</li>
<li>CLPGM52 and CLPGM53 are both OPM programs.</li>
<li>CLPGM53 is to send a message to CLPGM51 and does not know which procedure
is the most recently called.</li>
</ul>
The send is accomplished using the special value *PGMNAME and the
program name CLPGM51.</div>
<p>The special value *PGMNAME is useful if you convert some CL programs, but
not all CL programs, to ILE programs. For example, CLPGM71 is an OPM CL program;
CLPGM73 sent messages to CLPGM71 and specifies TOPGMQ(*SAME CLPGM71). If CLPGM71
is converted to ILE, only the <span class="cmdname">Send Program Message (SNDPGMMSG)</span> command
with the *PGM name in CLPGM73 (OPM) works. Specifying CLPGM71 as a simple
name does not work because there was no entry in the call stack for CLPGM71.
If you change the command to TOPGMQ(*SAME *PGMNAME *NONE CLPGM71), CLPGM73
sends messages successfully to CLPGM71 regardless of the names you may have
used for procedure names.</p>
<p>The special value *PGMNAME can also be used with an OPM program
name. In this case the effect is the same as if you just used the name. For
example, TOPGMQ(*SAME *PGMNAME *NONE opmpgm) sends the message to the same
place as TOPGMQ(*SAME opmpgm). The use of *PGMNAME should be considered when
you cannot determine whether the message is being sent to an OPM program name
or and ILE program name.</p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="callid.htm" title="If a CL procedure is to send a message to an OPM program or another ILE procedure, you must identify the call stack entry to which the message is sent.">Identify a call stack entry</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="callcontrolasbase.htm" title="You can identify the base call stack entry as the one at the nearest control boundary by using the special value *CTLBDY.">Use a control boundary as a base</a></div>
</div>
</div>
</body>
</html>