140 lines
7.6 KiB
HTML
140 lines
7.6 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="Example: Character string expressions" />
|
|||
|
<meta name="abstract" content="These are examples of string expressions." />
|
|||
|
<meta name="description" content="These are examples of string expressions." />
|
|||
|
<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="rbam6charstrexpexmp" />
|
|||
|
<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>Example: Character string expressions</title>
|
|||
|
</head>
|
|||
|
<body id="rbam6charstrexpexmp"><a name="rbam6charstrexpexmp"><!-- --></a>
|
|||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|||
|
<h1 class="topictitle1">Example: Character string expressions</h1>
|
|||
|
<div><p>These are examples of string expressions.</p>
|
|||
|
<div class="section"><p>Assume the following variables:</p>
|
|||
|
|
|||
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><thead align="left"><tr><th valign="top" width="31.155778894472363%" id="d0e21">Variable</th>
|
|||
|
<th valign="top" width="68.84422110552764%" id="d0e23">Value</th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody><tr><td valign="top" width="31.155778894472363%" headers="d0e21 ">&AA</td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e23 "><samp class="codeph"> 'GOOD ' </samp></td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e21 ">&BB</td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e23 "><samp class="codeph"> 'REPLACEMENT'</samp></td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e21 ">&CC</td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e23 "><samp class="codeph"> 'ALSO GOOD'</samp></td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e21 ">&DD</td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e23 "><samp class="codeph"> 'METHOD'</samp></td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<p>The following table shows character string expressions and the
|
|||
|
result.</p>
|
|||
|
|
|||
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><thead align="left"><tr><th valign="top" width="31.155778894472363%" id="d0e58">Expression</th>
|
|||
|
<th valign="top" width="68.84422110552764%" id="d0e60">Result</th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody><tr><td valign="top" width="31.155778894472363%" headers="d0e58 ">(&AA || &BB)</td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e60 ">GOOD REPLACEMENT</td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e58 ">(&AA||&BB)</td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e60 ">GOOD REPLACEMENT</td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e58 ">(&AA *CAT &BB)</td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e60 ">GOOD REPLACEMENT</td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e58 "> </td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e60 "> </td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e58 ">(&CC |> &DD)</td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e60 ">ALSO GOOD METHOD</td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e58 ">(&CC *BCAT &DD)</td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e60 ">ALSO GOOD METHOD</td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e58 "> </td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e60 "> </td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e58 ">(A *CAT MOUSE)</td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e60 ">AMOUSE</td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e58 ">('A ' *CAT MOUSE)</td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e60 ">A MOUSE</td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e58 "> </td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e60 "> </td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e58 ">(FAST *CAT MOUSE)</td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e60 ">FASTMOUSE</td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e58 ">('FAST ' *BCAT MOUSE)</td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e60 ">FAST MOUSE</td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e58 ">('FAST ' *TCAT MOUSE)</td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e60 ">FASTMOUSE</td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e58 "> </td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e60 "> </td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e58 ">('AB' *CAT 'CD')</td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e60 ">ABCD</td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e58 ">('AB' *BCAT 'CD')</td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e60 ">AB CD</td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e58 ">('AB' *TCAT 'CD')</td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e60 ">ABCD</td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e58 "> </td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e60 "> </td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e58 ">(%SST(&AA 1 5) *CAT (%SST(&BB 3 5))</td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e60 ">GOOD PLACE</td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e58 ">(%SST(&CC 1 9) *BCAT (%SST(&BB 3 5))</td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e60 ">ALSO GOOD PLACE</td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e58 "> </td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e60 "> </td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e58 ">(&AA *CAT ' TIME')</td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e60 ">GOOD TIME</td>
|
|||
|
</tr>
|
|||
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e58 ">(&CC *BCAT TIME)</td>
|
|||
|
<td valign="top" width="68.84422110552764%" headers="d0e60 ">ALSO GOOD TIME</td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div>
|
|||
|
<div class="familylinks">
|
|||
|
<div class="parentlink"><strong>Parent topic:</strong> <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>
|