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

90 lines
5.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="Validity checking" />
<meta name="abstract" content="The system performs validity checking on commands. You may also write your own validity checking program although it is not required." />
<meta name="description" content="The system performs validity checking on commands. You may also write your own validity checking program although it is not required." />
<meta name="DC.subject" content="validity checking, program, checking, program validity" />
<meta name="keywords" content="validity checking, program, checking, program validity" />
<meta name="DC.Relation" scheme="URI" content="ovhdc.htm" />
<meta name="DC.Relation" scheme="URI" content="clpgcmdAPIs.htm" />
<meta name="DC.Relation" scheme="URI" content="wvchk.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="valid" />
<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>Validity checking</title>
</head>
<body id="valid"><a name="valid"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Validity checking</h1>
<div><p>The system performs validity checking on commands. You may also
write your own validity checking program although it is not required.</p>
<p>The validity checking performed by the system ensures that: </p>
<ul><li>Values for the required parameters are entered.</li>
<li>Each parameter value meets data type and length requirements.</li>
<li>Each parameter value meets optional requirements specified in the command
definition of: <ul><li>A list of valid values</li>
<li>A range of values</li>
<li>A relational comparison to a value</li>
</ul>
</li>
<li>Conflicting parameters are not entered.</li>
</ul>
<p>The system performs validity checking when: </p>
<ul><li>Commands are entered interactively from a display station.</li>
<li>Commands are entered from a batch input stream using spooling.</li>
<li>Commands are entered into a database file through the source entry utility
(SEU).</li>
<li>A command is passed to the QCMDEXC, QCMDCHK, or QCAPCMD program by a call
from a HLL. </li>
<li>A CL module or OPM program is created.</li>
<li>Commands are run by a CL procedure or program or a REXX procedure.</li>
<li>A command is run using the C language system function.</li>
</ul>
<p>If you need more validity checking than the system performs, you can write
a program called a <em>validity checking program</em> or you can include the
checking in the command processing program. You specify the names of both
the command processing and validity checking programs on the CRTCMD command.</p>
<p>If a command has a validity checking program, the system passes the command
parameter values to the validity checking program. This happens before the
system calls the command processing program. A validity checking program runs
during syntax checking during the following conditions: </p>
<ul><li>When running the command.</li>
<li>When using the source entry utility (SEU) to enter commands into a CL
source member and the programmer uses constants instead of variables for the
parameters that are specified on the command.</li>
<li>When compiling a CL program or procedure that uses constants instead of
variables for all the parameters that are specified on the command.</li>
</ul>
<p>When the program finds an error, the user receives a message to allow immediate
correction of errors. The command processing program can assume that the data
that is passed to it is correct.</p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="ovhdc.htm" title="This shows how a command is created.">Command definition process</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="clpgcmdAPIs.htm" title="This describes application programming interfaces (APIs) and programs that can be used when working with commands.">Use command-related APIs</a></div>
</div>
<div class="reltasks"><strong>Related tasks</strong><br />
<div><a href="wvchk.htm" title="You can write a validity checking program for your command to detect errors and send diagnostic messages.">Write a validity checking program</a></div>
</div>
</div>
</body>
</html>