96 lines
6.1 KiB
HTML
96 lines
6.1 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="task" />
|
|
<meta name="DC.Title" content="Data type errors using the CALL command" />
|
|
<meta name="abstract" content="This details the types of data type errors that may occur when using the Call (CALL) command." />
|
|
<meta name="description" content="This details the types of data type errors that may occur when using the Call (CALL) command." />
|
|
<meta name="DC.subject" content="data type error, error, data type" />
|
|
<meta name="keywords" content="data type error, error, data type" />
|
|
<meta name="DC.Relation" scheme="URI" content="comer.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="workv.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../cl/call.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../cl/sbmjob.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../clfinder/finder.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="dataerrorc" />
|
|
<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>Data type errors using the CALL command</title>
|
|
</head>
|
|
<body id="dataerrorc"><a name="dataerrorc"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Data type errors using the CALL command</h1>
|
|
<div><p>This details the types of data type errors that may occur when
|
|
using the <span class="cmdname">Call (CALL)</span> command.</p>
|
|
<div class="section"> <p>The total length of the command string includes the command name,
|
|
spaces, parameter names, parentheses, contents of variables and apostrophes
|
|
used. For most commands, the command string initiates the command processing
|
|
program as expected. However, for some commands some variables may not be
|
|
passed as expected.</p>
|
|
<p>When the CALL command is used with the CMD parameter
|
|
on the <span class="cmdname">Submit Job (SBMJOB)</span> command, unexpected results <u>may</u> occur.
|
|
Syntactically, the CALL command appears the same when used with the CMD parameter
|
|
as it does when used as the compiler directive for the CALL command. When
|
|
used with the CMD parameter, the <span class="cmdname">Call (CALL)</span> command is
|
|
converted to a command string that is run at a later time when the batch subsystem
|
|
initiates it. When the <span class="cmdname">Call (CALL)</span> command is used by itself,
|
|
the CL compiler generates code to perform the call.</p>
|
|
<p>Common problems
|
|
with decimal constants and character variables often occur. In the following
|
|
cases, the command string is not constructed as needed: </p>
|
|
<ul><li>When decimal numbers are converted to decimal constants. <p>When the
|
|
command string is run, the decimal constant is passed in a packed form with
|
|
a length of LEN(15 5). It is not passed in the form specified by the CL variable.</p>
|
|
</li>
|
|
<li>When a character variable is declared longer than 32 characters.</li>
|
|
</ul>
|
|
<p>The contents of the character variable is passed as described previously,
|
|
usually as a quoted character constant with the trailing blanks removed. As
|
|
a result, the called program may not be passed enough data.</p>
|
|
<p>The following
|
|
methods can be used to correct errors in constructing command strings: </p>
|
|
<ul><li>Create the CALL command string to be submitted by concatenating the various
|
|
portions of the command together into one CL variable. Submit the command
|
|
string using the request data (RQSDTA) parameter of the <span class="cmdname">Submit Job
|
|
(SBMJOB)</span> command.</li>
|
|
<li>For CL character variables larger than 32 characters where trailing blanks
|
|
are significant, create a variable that is one character larger than needed
|
|
and substring a non-blank character into the last position. This prevents
|
|
the significant blanks from being truncated. The called program should ignore
|
|
the extra character because it is beyond the length expected.</li>
|
|
<li>Create a command that will initiate the program to be called. Submit the
|
|
new command instead of using the <span class="cmdname">Call (CALL)</span> command.
|
|
The command definition ensures the parameters are passed to the command processing
|
|
program as expected.</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="comer.htm" title="This describes the errors encountered most frequently in passing values on a CALL command or a CALLPRC command. Some of these errors can be very difficult to debug, and some have serious consequences for program functions.">Common errors when calling programs and procedures</a></div>
|
|
</div>
|
|
<div class="reltasks"><strong>Related tasks</strong><br />
|
|
<div><a href="workv.htm" title="CL procedures consist of CL commands, and the commands themselves consist of the command statement, parameters, and parameter values.">Use variables</a></div>
|
|
</div>
|
|
<div class="relinfo"><strong>Related information</strong><br />
|
|
<div><a href="../cl/call.htm">Call (CALL) command</a></div>
|
|
<div><a href="../cl/sbmjob.htm">Submit Job (SBMJOB) command</a></div>
|
|
<div><a href="../clfinder/finder.htm">CL command finder</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |