81 lines
4.9 KiB
HTML
81 lines
4.9 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="Write comments in CL procedures" />
|
|
<meta name="abstract" content="This describes how to write comments in CL procedures." />
|
|
<meta name="description" content="This describes how to write comments in CL procedures." />
|
|
<meta name="DC.subject" content="writing, comment in CL procedure, CL procedure, writing comment, /* (comment) delimiter, comment delimiter (/*), * (asterisk), comments in programs, asterisk (*)" />
|
|
<meta name="keywords" content="writing, comment in CL procedure, CL procedure, writing comment, /* (comment) delimiter, comment delimiter (/*), * (asterisk), comments in programs, asterisk (*)" />
|
|
<meta name="DC.Relation" scheme="URI" content="workv.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="clpms" />
|
|
<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>Write comments in CL procedures</title>
|
|
</head>
|
|
<body id="clpms"><a name="clpms"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Write comments in CL procedures</h1>
|
|
<div><p>This describes how to write comments in CL procedures.</p>
|
|
<div class="section"> <p>When you want to write comments in your CL procedures or add
|
|
comments to commands in your procedures, use the character pairs <samp class="codeph">/*</samp> and <samp class="codeph">*/</samp>.
|
|
The comment is written between these symbols.</p>
|
|
<p>The starting
|
|
comment delimiter, <samp class="codeph">/*</samp>, requires three characters unless the <samp class="codeph">/*</samp> characters
|
|
appear in the first two positions of the command string. In the latter situation, <samp class="codeph">/*</samp> can
|
|
be used without a following blank before a command.</p>
|
|
<p>You can enter the
|
|
three-character starting comment delimiters in any of the following ways (b
|
|
represents a blank): </p>
|
|
<pre> /*b
|
|
b/*
|
|
/**</pre>
|
|
<p>Therefore, the starting comment delimiter can be entered four
|
|
ways. The starting comment delimiter, <samp class="codeph">/*</samp>, can: </p>
|
|
<ul><li>Begin in the first position of the command string</li>
|
|
<li>Be preceded by a blank</li>
|
|
<li>Be followed by a blank</li>
|
|
<li>Be followed by an asterisk (<samp class="codeph">/**</samp>).</li>
|
|
</ul>
|
|
<div class="note"><span class="notetitle">Note:</span> A comment cannot be imbedded within a comment.</div>
|
|
<p>For example,
|
|
in the following procedure, comments are written to describe possible user
|
|
responses to a set of menu options: </p>
|
|
<pre>
|
|
PGM /* ORD040C ORDER DEPT GENERAL MENU */
|
|
DCLF FILE(ORD040CD)
|
|
START: SNDRCVF RCDFMT(MENU)
|
|
SELECT
|
|
WHEN (&RESP=1) THEN(CALL CUS210) /* CUSTOMER INQUIRY */
|
|
WHEN (&RESP=2) THEN(CALL ITM210) /* ITEM INQUIRY */
|
|
WHEN (&RESP=3) THEN(CALL CUS210) /* CUSTOMER NAME SEARCH */
|
|
WHEN (&RESP=4) THEN(CALL ORD215) /* ORDERS BY CUST */
|
|
WHEN (&RESP=5) THEN(CALL ORD220) /* EXISTING ORDER */
|
|
WHEN (&RESP=6) THEN(CALL ORD410C) /* ORDER ENTRY */
|
|
WHEN (&RESP=7) THEN(RETURN)
|
|
ENDSELECT
|
|
GOTO START
|
|
ENDPGM </pre>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <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>
|
|
</body>
|
|
</html> |