314 lines
16 KiB
HTML
314 lines
16 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="reference" />
|
||
<meta name="DC.Title" content="Character string" />
|
||
<meta name="abstract" content="A character string is a string of any EBCDIC characters (alphanumeric and special) that are used as a value." />
|
||
<meta name="description" content="A character string is a string of any EBCDIC characters (alphanumeric and special) that are used as a value." />
|
||
<meta name="DC.Relation" scheme="URI" content="rbam6constvalues.htm" />
|
||
<meta name="DC.Relation" scheme="URI" content="rbam6datevalues.htm" />
|
||
<meta name="DC.Relation" scheme="URI" content="rbam6hexvalues.htm" />
|
||
<meta name="DC.Relation" scheme="URI" content="rbam6express.htm" />
|
||
<meta name="DC.Relation" scheme="URI" content="rbam6charstrngexp.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="rbam6charstrings" />
|
||
<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>Character string</title>
|
||
</head>
|
||
<body id="rbam6charstrings"><a name="rbam6charstrings"><!-- --></a>
|
||
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
<h1 class="topictitle1">Character string</h1>
|
||
<div><p>A character string is a string of any EBCDIC characters (alphanumeric
|
||
and special) that are used as a value.</p>
|
||
<div class="section"><p>These EBCDIC values can include date and hexadecimal values.
|
||
A character string can have two forms: quoted string or unquoted string. Either
|
||
form of character string can contain as many as 5000 characters.</p>
|
||
<p>A <em>quoted</em> character
|
||
string is a string of alphanumeric and special characters that are enclosed
|
||
in apostrophes. For example, 'Credit limit has been exceeded' is a quoted
|
||
character string. The quoted string is used for character data that is not
|
||
valid in an unquoted character string. For example, user-specified text can
|
||
be entered in several commands to describe the functions of the commands.
|
||
Those descriptions must be enclosed in apostrophes if they contain more than
|
||
one word because blanks are not allowed in an unquoted string.</p>
|
||
<p>An <em>unquoted</em> character
|
||
string is a string consisting of only alphanumeric characters and the special
|
||
characters that are shown in the <em>Unquoted String</em> column in the table
|
||
below table. The table summarizes the main EBCDIC characters that are valid
|
||
in unquoted and quoted character string values. An X in the last column indicates
|
||
that the character on the left is valid; refer to the specific notes following
|
||
the figure that indicate why the character is valid as described. The special
|
||
characters allow the following to be unquoted character string values:</p>
|
||
<ul><li>Predefined values (* at the beginning)</li>
|
||
<li>Qualified object names (/)</li>
|
||
<li>Generic names (* at the end)</li>
|
||
<li>Decimal constants (+, -, ., and ,)</li>
|
||
</ul>
|
||
<p>Any of these unquoted strings can be specified for parameters defined
|
||
to accept character strings. In addition, some parameters are defined to accept
|
||
predefined values, names, or decimal values either singly or in combinations.</p>
|
||
|
||
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><caption>Table 1. Quoted and Unquoted Character Strings </caption><thead align="left"><tr><th valign="top" id="d0e52">Name of Character</th>
|
||
<th valign="top" id="d0e54">Character</th>
|
||
<th valign="top" id="d0e56">Unquoted String</th>
|
||
<th valign="top" id="d0e58">Quoted String</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr><td valign="top" headers="d0e52 ">Ampersand</td>
|
||
<td valign="top" headers="d0e54 ">&</td>
|
||
<td valign="top" headers="d0e56 ">See Note 5</td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Apostrophe</td>
|
||
<td valign="top" headers="d0e54 ">'</td>
|
||
<td valign="top" headers="d0e56 ">See Note 7</td>
|
||
<td valign="top" headers="d0e58 ">-</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Asterisk (*)</td>
|
||
<td valign="top" headers="d0e54 ">*</td>
|
||
<td valign="top" headers="d0e56 ">See Notes 5, 6</td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">At sign</td>
|
||
<td valign="top" headers="d0e54 ">@</td>
|
||
<td valign="top" headers="d0e56 ">X</td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Blank</td>
|
||
<td valign="top" headers="d0e54 "> </td>
|
||
<td valign="top" headers="d0e56 "> </td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Colon</td>
|
||
<td valign="top" headers="d0e54 ">:</td>
|
||
<td valign="top" headers="d0e56 "> </td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Comma</td>
|
||
<td valign="top" headers="d0e54 ">,</td>
|
||
<td valign="top" headers="d0e56 ">See Note 1</td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Digits</td>
|
||
<td valign="top" headers="d0e54 ">0-9</td>
|
||
<td valign="top" headers="d0e56 ">See Note 1</td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Dollar sign</td>
|
||
<td valign="top" headers="d0e54 ">$</td>
|
||
<td valign="top" headers="d0e56 ">X</td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Equal</td>
|
||
<td valign="top" headers="d0e54 ">=</td>
|
||
<td valign="top" headers="d0e56 ">See Notes 5, 8</td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Greater than</td>
|
||
<td valign="top" headers="d0e54 ">></td>
|
||
<td valign="top" headers="d0e56 ">See Notes 5, 8</td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Left parenthesis</td>
|
||
<td valign="top" headers="d0e54 ">(</td>
|
||
<td valign="top" headers="d0e56 ">See Note 4</td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Less than</td>
|
||
<td valign="top" headers="d0e54 "><</td>
|
||
<td valign="top" headers="d0e56 ">See Notes 5, 8</td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Letters (lowercase)</td>
|
||
<td valign="top" headers="d0e54 ">a-z</td>
|
||
<td valign="top" headers="d0e56 ">See Note 2</td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Letters (uppercase)</td>
|
||
<td valign="top" headers="d0e54 ">A-Z</td>
|
||
<td valign="top" headers="d0e56 ">X</td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Minus</td>
|
||
<td valign="top" headers="d0e54 ">-</td>
|
||
<td valign="top" headers="d0e56 ">See Notes 1, 5</td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Not</td>
|
||
<td valign="top" headers="d0e54 "> <br /><img src="notsym.gif" alt="not symbol" /><br /> </td>
|
||
<td valign="top" headers="d0e56 ">See Notes 5, 8</td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Number sign</td>
|
||
<td valign="top" headers="d0e54 ">#</td>
|
||
<td valign="top" headers="d0e56 ">X</td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Percent</td>
|
||
<td valign="top" headers="d0e54 ">%</td>
|
||
<td valign="top" headers="d0e56 "> </td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Period</td>
|
||
<td valign="top" headers="d0e54 ">.</td>
|
||
<td valign="top" headers="d0e56 ">See Notes 1, 11</td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Plus</td>
|
||
<td valign="top" headers="d0e54 ">+</td>
|
||
<td valign="top" headers="d0e56 ">See Notes 1, 5</td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Question mark</td>
|
||
<td valign="top" headers="d0e54 ">?</td>
|
||
<td valign="top" headers="d0e56 "> </td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Quotation marks</td>
|
||
<td valign="top" headers="d0e54 ">" "</td>
|
||
<td valign="top" headers="d0e56 ">See Note 10</td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Right parenthesis</td>
|
||
<td valign="top" headers="d0e54 ">)</td>
|
||
<td valign="top" headers="d0e56 ">See Note 4</td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Semicolon</td>
|
||
<td valign="top" headers="d0e54 ">;</td>
|
||
<td valign="top" headers="d0e56 "> </td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Slash</td>
|
||
<td valign="top" headers="d0e54 ">/</td>
|
||
<td valign="top" headers="d0e56 ">See Notes 3, 5</td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Underscore</td>
|
||
<td valign="top" headers="d0e54 ">_</td>
|
||
<td valign="top" headers="d0e56 ">See Note 9</td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e52 ">Vertical bar</td>
|
||
<td valign="top" headers="d0e54 ">|</td>
|
||
<td valign="top" headers="d0e56 ">See Notes 5, 8</td>
|
||
<td valign="top" headers="d0e58 ">X</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="note"><span class="notetitle">Note:</span> <ol><li id="rbam6charstrings__note1"><a name="rbam6charstrings__note1"><!-- --></a>An unquoted string of all numeric characters, an optional single
|
||
decimal point (. or ,), and an optional leading sign (+ or -) are
|
||
valid unquoted strings. Depending on the parameter attributes in the command
|
||
definition, this unquoted string is treated as either a numeric or character
|
||
value. On the CALL command or in an expression, this unquoted string is treated
|
||
as a numeric value; a quoted string is required if character representation
|
||
is desired. Numeric characters used in any combination with alphanumeric characters
|
||
are also valid in an unquoted string. </li>
|
||
<li id="rbam6charstrings__note2"><a name="rbam6charstrings__note2"><!-- --></a>In an unquoted string, lowercase letters are translated into
|
||
uppercase letters unless the string is specified for a parameter that has
|
||
the attribute CASE(*MIXED). </li>
|
||
<li id="rbam6charstrings__note3"><a name="rbam6charstrings__note3"><!-- --></a>A slash can be used as a connector in qualified names and path
|
||
names. </li>
|
||
<li id="rbam6charstrings__note4"><a name="rbam6charstrings__note4"><!-- --></a>In an unquoted string, parentheses are valid when used to delimit
|
||
keyword values and lists, or in expressions to indicate the order of evaluation. </li>
|
||
<li id="rbam6charstrings__note5"><a name="rbam6charstrings__note5"><!-- --></a>In an unquoted string, the characters +, -, *, /, &, |,
|
||
<img src="notsym.gif" alt="not symbol" />, <, >, and = are
|
||
valid by themselves. If they are specified on a parameter that is defined
|
||
in the command definition with the EXPR(*NO) attribute, they are treated as
|
||
character values. If they are specified on a parameter that is defined in
|
||
the command definition with the EXPR(*YES) attribute, they are treated as
|
||
expression operators. </li>
|
||
<li id="rbam6charstrings__note6"><a name="rbam6charstrings__note6"><!-- --></a>In an unquoted string, the asterisk is valid when followed
|
||
immediately by a name (such as in a predefined value) and when preceded immediately
|
||
by a name (such as in a generic name).</li>
|
||
<li id="rbam6charstrings__note7"><a name="rbam6charstrings__note7"><!-- --></a>Because an apostrophe within a quoted string is paired with
|
||
the opening apostrophe (delimiter) and is interpreted as the ending delimiter,
|
||
an adjacent pair of apostrophes ('') must be used inside a quoted string to
|
||
represent an apostrophe that is not a delimiter. When characters are counted
|
||
in a quoted string, a pair of adjacent apostrophes is counted as a single
|
||
character. </li>
|
||
<li id="rbam6charstrings__note8"><a name="rbam6charstrings__note8"><!-- --></a>In an unquoted string, the characters <, >, =, <img src="notsym.gif" alt="not symbol" />, and | are valid in some combinations
|
||
with another character in the same set. Valid combinations are: <=, >=,
|
||
<img src="notsym.gif" alt="not symbol" />=, <img src="notsym.gif" alt="not symbol" />>, <img src="notsym.gif" alt="not symbol" /><, ||, |<, and |>. If the combination is specified on a parameter
|
||
that is defined in the command definition with the EXPR(*NO) attribute, it
|
||
is treated as a character value. If it is specified on a parameter that is
|
||
defined in the command definition with the EXPR(*YES) attribute, it is treated
|
||
as an expression operator. </li>
|
||
<li id="rbam6charstrings__note9"><a name="rbam6charstrings__note9"><!-- --></a>In an unquoted string, the underscore is not valid as the first
|
||
character or when used by itself. </li>
|
||
<li id="rbam6charstrings__note10"><a name="rbam6charstrings__note10"><!-- --></a>Quotation marks are used to delimit a quoted name. </li>
|
||
<li id="rbam6charstrings__note11"><a name="rbam6charstrings__note11"><!-- --></a>A period is valid in a basic name, except as the first character.</li>
|
||
</ol>
|
||
</div>
|
||
<p>The following are examples of quoted string constants:</p>
|
||
|
||
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><caption>Table 2. Quoted string constants</caption><thead align="left"><tr><th valign="top" id="d0e359">Constant</th>
|
||
<th valign="top" id="d0e361">Value</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr><td valign="top" headers="d0e359 ">'1,2,'</td>
|
||
<td valign="top" headers="d0e361 ">1,2,</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e359 ">'DON''T'</td>
|
||
<td valign="top" headers="d0e361 ">DON'T</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e359 ">'24 12 20'</td>
|
||
<td valign="top" headers="d0e361 ">24 12 20</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<p>The following are examples of unquoted string constants:</p>
|
||
|
||
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><caption>Table 3. Unquoted string constants</caption><thead align="left"><tr><th valign="top" id="d0e389">Constant</th>
|
||
<th valign="top" id="d0e391">Meaning</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr><td valign="top" headers="d0e389 ">CHICAGO</td>
|
||
<td valign="top" headers="d0e391 ">CHICAGO</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e389 ">FILE1</td>
|
||
<td valign="top" headers="d0e391 ">FILE1</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e389 ">*LIBL</td>
|
||
<td valign="top" headers="d0e391 ">Library list</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e389 ">LIBX/PGMA</td>
|
||
<td valign="top" headers="d0e391 ">Program PGMA in library LIBX</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e389 ">1.2</td>
|
||
<td valign="top" headers="d0e391 ">1.2</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<div class="familylinks">
|
||
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbam6constvalues.htm" title="A constant value is the actual value. The types of constants are character string (includes names, date and hexadecimal values), decimal, and logical.">Constant value</a></div>
|
||
</div>
|
||
<div class="relref"><strong>Related reference</strong><br />
|
||
<div><a href="rbam6datevalues.htm" title="A date value is a character string that represents a date.">Date values</a></div>
|
||
<div><a href="rbam6hexvalues.htm" title="A hexadecimal value is a constant made up of a combination of the hexadecimal digits A through F and 0 through 9.">Hexadecimal values</a></div>
|
||
<div><a href="rbam6express.htm" title="An expression is the value used as the result of evaluating an expression.">Expressions</a></div>
|
||
<div><a href="rbam6charstrngexp.htm" title="The operands in a character string expression must be quoted or unquoted character strings, character variables, or the substring (%SUBSTRING or %SST) built-in function.">Character string expressions</a></div>
|
||
</div>
|
||
</div>
|
||
</body>
|
||
</html> |