ibm-information-center/dist/eclipse/plugins/i5OS.ic.nls_5.4.0.1/rbagsfldvalidspecs.htm

114 lines
6.0 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?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="Field validation specifications" />
<meta name="abstract" content="The DDS keywords in this topic provide validation checks on input-capable fields on your display." />
<meta name="description" content="The DDS keywords in this topic provide validation checks on input-capable fields on your display." />
<meta name="DC.Relation" scheme="URI" content="rbagsdispfiledsgngide.htm" />
<meta name="DC.Relation" scheme="URI" content="../rzakc/rzakcmstdfrange.htm" />
<meta name="DC.Relation" scheme="URI" content="../rzakc/rzakcmstdfval.htm" />
<meta name="DC.Relation" scheme="URI" content="../rzakc/rzakcmstdfcmp.htm" />
<meta name="DC.Relation" scheme="URI" content="../rzakc/rzakcmstdfcheck.htm" />
<meta name="DC.Relation" scheme="URI" content="../rzakc/rzakcmstdfchkme.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="rbagsfldvalidspecs" />
<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>Field validation specifications</title>
</head>
<body id="rbagsfldvalidspecs"><a name="rbagsfldvalidspecs"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Field validation specifications</h1>
<div><p>The DDS keywords in this topic provide validation checks on input-capable
fields on your display.</p>
<ul><li>RANGE (Range checking)</li>
<li>VALUES (Values checking)</li>
<li>CMP and COMP (Comparison)</li>
<li>CHECK (Check validity, keyboard control and cursor control)</li>
</ul>
<p>Using the DDS keywords with any hard-coded values that are language, country,
or cultural-dependent makes duplication and modification of the
DDS and the application program necessary.</p>
<div class="section"><h4 class="sectiontitle">Example: Validation checks</h4><p>An example of field validation
checks on input-capable fields on your display using the DDS keywords VALUES,
COMP, and CHECK follows:</p>
<pre>A field-name length type usage line pos VALUES('Y' 'N')
or
A field-name length type usage line pos COMP(EQ 'US$')
or
A field-name length type usage line pos CHECK(M10 or M11)
(Modulus checking)
or
A field-name length type usage line pos CHECK(RL)
(Right-to-left support)</pre>
<p>Validation checks are provided according
to the sort sequence defined for the display file at creation time. You can
use the same DDS source file to create objects for different languages. For
example, the following command creates a display object tagged with the Latin
1 sort sequence table:</p>
<pre>CRTDSPF FILE(name) SRTSEQ(*LANGIDSHR) LANGID(DEU)</pre>
<p>The
following specification:</p>
<pre>A field-name length type usage line pos COMP(EQ 'a')</pre>
<p>accepts
all lowercase, uppercase, and accented characters, as defined by the shared-weight
in the Latin 1 sort sequence.</p>
<p>In addition, note
that all the checks specified using those DDS keywords are done by the data
management function of the operating system. Any error message caused by wrong
input or handling by the user appears in the language of the operating system.
This can be the primary language or a secondary language, depending how the
library list of the job is set up.</p>
<p>You can override
this when you use the additional DDS keyword CHKMSGID (Check Message Identifier).
This keyword allows you to specify your own customized messages and message
file to be used by the checking routines of the operating system.</p>
<p>For
example:</p>
<pre>A field-name length type usage RANGE(1 999)
A CHKMSGID(USR1234 [*libl/]APPMSGF [&amp;MSGFLD1])
A MSGFLD1 length type P TEXT('Message data field')
and
ADDMSGD MSGID(USR1234) MSGF(APPTXDENU/APPMSGF)
MSG('Value &amp;1; is out of range 1 to 999')
and
ADDMSGD MSGID(USR1234) MSGF(APPTXDDEU/APPMSGF)</pre>
<p><samp class="codeph">MSG('Wert &amp;1;
ist ausserhalb des g</samp> <img src="lu170000.gif" alt="U umlaut character" /> <samp class="codeph">ltigen Bereichs 1 bis 999')</samp></p>
<p>To use different
message files of different library names, do not specify a fixed library name.
You can use a message file for different languages by setting the library
list when you run the program.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbagsdispfiledsgngide.htm" title="Application panels typically consist of the major elements in this topic.">Display file design</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="../rzakc/rzakcmstdfrange.htm">RANGE (Range) keyword</a></div>
<div><a href="../rzakc/rzakcmstdfval.htm">VALUES (Values) keyword</a></div>
<div><a href="../rzakc/rzakcmstdfcmp.htm">CMP (Comparison) keyword</a></div>
<div><a href="../rzakc/rzakcmstdfcheck.htm">CHECK (Check) keyword</a></div>
<div><a href="../rzakc/rzakcmstdfchkme.htm">CHKMSGID (Check Message Identifier) keyword</a></div>
</div>
</div>
</body>
</html>