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

60 lines
3.4 KiB
HTML
Raw Permalink 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="%SWITCH with the Change Variable (CHGVAR) command" />
<meta name="abstract" content="On the Change Variable (CHGVAR) command, you can specify %SWITCH to change the value of a logical variable." />
<meta name="description" content="On the Change Variable (CHGVAR) command, you can specify %SWITCH to change the value of a logical variable." />
<meta name="DC.subject" content="CHGVAR (Change Variable) command, %SWITCH setting" />
<meta name="keywords" content="CHGVAR (Change Variable) command, %SWITCH setting" />
<meta name="DC.Relation" scheme="URI" content="switc.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/chgvar.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="chgv" />
<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>%SWITCH with the Change Variable (CHGVAR) command</title>
</head>
<body id="chgv"><a name="chgv"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">%SWITCH with the <span class="cmdname">Change Variable (CHGVAR)</span> command</h1>
<div><p>On the <span class="cmdname">Change Variable (CHGVAR)</span> command, you
can specify %SWITCH to change the value of a logical variable. </p>
<div class="section"><p>The value of the logical variable is determined by the results
of comparing your %SWITCH settings with the job switch settings. If the result
of the comparison is true, the logical variable is set to '1'. If the result
is false, the variable is set to '0'. For instance, if the job switch is
set to <samp class="codeph">10000001</samp> and this procedure is processed, then the
variable &amp;A has a value of '1'.: </p>
<pre>PGM
DCL &amp;A *LGL
CHGVAR VAR(&amp;A) VALUE(%SWITCH(10000001))
.
.
.
ENDPGM</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="switc.htm" title="The switch built-in function (%SWITCH) compares one or more of eight switches with the eight switch settings already established for the job and returns a logical value of '0' or '1'.">%SWITCH built-in function</a></div>
</div>
<div class="relinfo"><strong>Related information</strong><br />
<div><a href="../cl/chgvar.htm">Change Variable (CHGVAR) command</a></div>
</div>
</div>
</body>
</html>