69 lines
4.3 KiB
HTML
69 lines
4.3 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="Program storage" />
|
|
<meta name="abstract" content="Two steps are needed to run a program: program activation and program invocation." />
|
|
<meta name="description" content="Two steps are needed to run a program: program activation and program invocation." />
|
|
<meta name="DC.Relation" scheme="URI" content="MIpgmg.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="MIenhver.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="MIprosto" />
|
|
<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>Program storage</title>
|
|
</head>
|
|
<body id="MIprosto"><a name="MIprosto"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Program storage</h1>
|
|
<div><p>Two steps are needed to run a program: program activation and program
|
|
invocation.</p>
|
|
<p><span class="uicontrol">Program activation</span> is the process of allocating
|
|
and initializing static storage for the program. <span class="uicontrol">Program invocation</span> is
|
|
the process of allocating and initializing automatic storage.</p>
|
|
<div class="section"><h4 class="sectiontitle">Program activation and static storage</h4><p>Program activation
|
|
can be done explicitly through the Activate Program (ACTPG) instruction or
|
|
implicitly by using a call external (CALLX) instruction when the called program
|
|
has not been previously activated. Program activation typically occurs only
|
|
once within a job or process. Program activation is not reset by an RTX instruction
|
|
within the called program (the program is still considered to be in an activated
|
|
state). This means that all static storage on subsequent calls (CALLXs) to
|
|
the program are found in a last-used state, not in a reinitialized state.
|
|
If a programmer wants to reinitialize the static storage associated with a
|
|
program activation, this can be accomplished through the deactivate program
|
|
(DEACTPG) instruction so that the next call (CALLX or ACTPG) causes a new
|
|
activation of the program.</p>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">Program invocation and automatic storage</h4><p>Program
|
|
invocation, on the other hand, occurs every time a program is called with
|
|
a CALLX instruction. Automatic storage is reinitialized if a discrete INIT
|
|
value was specified on the declare (DCL) statement. (If the INIT was allowed
|
|
to be the default, then whether or not initialization occurs for the field
|
|
is determined by an option of the QPRCRTPG API when the program was created.)
|
|
If you have not already done so, review all of the option template values
|
|
available on the QPRCRTPG API before developing your MI applications.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="MIpgmg.htm" title="Provides information about creating machine interface (MI) programs.">Machine interface programming</a></div>
|
|
</div>
|
|
<div class="reltasks"><strong>Related tasks</strong><br />
|
|
<div><a href="MIenhver.htm" title="A new version of MICRTPG (named MICRTPG2) incorporateS the functions of the CL03 program and the CL05 program.">Enhanced version of the MICRTPG program</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |