196 lines
12 KiB
HTML
196 lines
12 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="concept" />
|
|
<meta name="DC.Title" content="Source for message catalogs" />
|
|
<meta name="abstract" content="The source for a message catalog is either a source physical file, a stream file, or multiple files. The source contains fields to define set numbers, message numbers, message text, or to specify sets to delete." />
|
|
<meta name="description" content="The source for a message catalog is either a source physical file, a stream file, or multiple files. The source contains fields to define set numbers, message numbers, message text, or to specify sets to delete." />
|
|
<meta name="DC.Relation" scheme="URI" content="rbagsmessagecatalogs.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="rbagsmsgcatsource" />
|
|
<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>Source for message catalogs</title>
|
|
</head>
|
|
<body id="rbagsmsgcatsource"><a name="rbagsmsgcatsource"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Source for message catalogs</h1>
|
|
<div><p>The source for a message catalog is either a source physical file,
|
|
a stream file, or multiple files. The source contains fields to define set
|
|
numbers, message numbers, message text, or to specify sets to delete.</p>
|
|
<p>The following topics provide additional information and examples relating
|
|
to message catalogs.</p>
|
|
<div class="section" id="rbagsmsgcatsource__Header_246"><a name="rbagsmsgcatsource__Header_246"><!-- --></a><h4 class="sectiontitle">Message catalog source format</h4><p>A
|
|
message catalog contains five fields of message text source lines. A single
|
|
blank character separates each of the five fields. Any other blank characters
|
|
are considered as part of the subsequent field data. See <a href="#rbagsmsgcatsource__specchars">Special characters and escape sequences</a> for additional information.</p>
|
|
<div class="note"><span class="notetitle">Note:</span> Enter the key
|
|
fields exactly as in the following list, using the dollar sign ($) and lowercase
|
|
characters. Definitions for maximum and minimum values are stored in QSYSINC/QSYS/LIMITS.</div>
|
|
<ul><li><span class="uicontrol">$ comment</span> <p>A line that begins with $ that is
|
|
followed by one or more blank characters is treated as a comment line. A omment
|
|
line should be placed directly beneath the message to which it refers. Place
|
|
comments for an entire set directly below the $set directive
|
|
in the source file.</p>
|
|
</li>
|
|
<li><span class="uicontrol">$quote</span> <var class="varname">C</var> <p>This line specifies
|
|
an optional quote character <var class="varname">C</var> that is used to surround
|
|
message text. This character enables trailing spaces or null (empty) messages
|
|
to be visible in a message source line. By default, or if an empgy $quote
|
|
directive is supplied, no quoting of message text is recognized.</p>
|
|
</li>
|
|
<li><span class="uicontrol">$set</span> <span class="uicontrol">n</span> <span class="uicontrol">comment</span> <p>This
|
|
line specifies the set identifier of the messages to follow until the next
|
|
$set or end-of-file appears. The <var class="varname">N</var> denotes the set identifier
|
|
that is defined by a number between 1 and NL_SETMAX. Place set identifiers
|
|
in ascending order within a single source file. They do not need to be contiguous.
|
|
A character string that follows a set identifier is treated as a comment and
|
|
ignored.</p>
|
|
</li>
|
|
<li><span class="uicontrol">$delsetncomment</span> <p>This line deletes message set <var class="varname">n</var> from
|
|
an existing message catalog. The <var class="varname">n</var> specifies the set number.
|
|
Data that follows the set number is treated as a comment. The $set and $delset
|
|
identifiers can both be in the message catalog source or the field tags.</p>
|
|
</li>
|
|
<li><span class="uicontrol">m</span> <span class="uicontrol">message text</span> <p>The <var class="varname">m</var> specifies
|
|
the message identifier that is defined by a number between 1 and NL_SETMAX.
|
|
The message text is stored in the message catalog with message identifier
|
|
<var class="varname">m</var> with the set identifier that is specified in the last
|
|
$set directive. If the message text is empty and a blank character field separator
|
|
is present, it stores an empty string in the message catalog. Existing messages
|
|
get deleted from the catalog if the message line does not have a field separator
|
|
or MESSAGE TEXT and a NEWLINE or carriage return follows the message line.
|
|
Message identifiers must be in ascending order, noncontiguous, and within
|
|
a single set. The length of the MESSAGE TEXT must be in the range of 0 to
|
|
NL_TEXTMAX.</p>
|
|
<div class="note"><span class="notetitle">Note:</span> Empty lines in a message text source file will be ignored.</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="section" id="rbagsmsgcatsource__Header_248"><a name="rbagsmsgcatsource__Header_248"><!-- --></a><h4 class="sectiontitle">Messages programming format</h4><p>MESSAGES
|
|
should follow these recommendations:</p>
|
|
<ul><li>The last line of all messages should end with \n.</li>
|
|
<li>The second and remaining lines of a message should begin with \t, indicating
|
|
a tab.</li>
|
|
<li>All lines of messages that continue to the next line should end with \n\,
|
|
indicating that the message continues to the next line.</li>
|
|
<li>The quotation mark at the end or beginning of a line should be omitted.
|
|
The quotation mark delineates the beginning and end of a complete message.</li>
|
|
</ul>
|
|
</div>
|
|
<div class="section" id="rbagsmsgcatsource__Header_250"><a name="rbagsmsgcatsource__Header_250"><!-- --></a><h4 class="sectiontitle">Using multiple source files</h4><p>You
|
|
can specify multiple source files for the source file parameter. The messages
|
|
that are contained in all of the files must follow the same rules for sets
|
|
and messages as defined in a single source file. For example, the first source
|
|
file contains messages in sets 1 through 3. The next source file must begin
|
|
with set 3 and have a message number greater than the last message number
|
|
in the first source file. If not, it must contain sets that begin with a number
|
|
higher than the highest number (set 3) in the previous source file.</p>
|
|
</div>
|
|
<div class="section" id="rbagsmsgcatsource__Header_251"><a name="rbagsmsgcatsource__Header_251"><!-- --></a><h4 class="sectiontitle">Replacing messages</h4><p>Messages in an
|
|
existing message catalog can be replaced by specifying a source file that
|
|
contains the same set number and message number as the message text you want
|
|
to change. All other messages in the source file remain the same. To update
|
|
a value for the $QUOTE in a catalog, use the same $QUOTE character in subsequent
|
|
source files.</p>
|
|
</div>
|
|
<div class="section" id="rbagsmsgcatsource__Header_255"><a name="rbagsmsgcatsource__Header_255"><!-- --></a><h4 class="sectiontitle">Example source for a message catalog</h4><p>Here is a sample format for the source that is used to create
|
|
a message catalog. A quotation mark delineates each message. The message text
|
|
that is stored in the message catalog has had the extraneous blank characters
|
|
removed. This example describes three sets of messages. Set 2 is deleted while
|
|
sets 1 and 3 remain stored in the message catalog.</p>
|
|
<pre>$ Messages for my new product
|
|
$quote "
|
|
|
|
$set 1
|
|
|
|
1 "Error occurred.\n"
|
|
$ The next message is continued on the next line.
|
|
2 "This is a very long message \n\
|
|
\t that requires another line to display. \n"
|
|
3 "Specify a value greater than %d.\n"
|
|
4 "File %c cannot be used at this time.\n"
|
|
|
|
$set 2
|
|
1 "Error %d occurred. \n"
|
|
2 "Flag not set.\n"
|
|
3 "Number of arguments must be %d.\n"
|
|
|
|
$set 4
|
|
1 "Before using this command, you must \
|
|
set the correct values in the %c box.\n"
|
|
2 "You have not properly NLS enabled this function.\n"
|
|
10 "Messages should end with a %c.\n"
|
|
|
|
$delset 2</pre>
|
|
<div class="note"><span class="notetitle">Note:</span> Message 2 in set 1 will be displayed in two lines.
|
|
Message 1 in set 4 will display as a one line message.</div>
|
|
<p>Here
|
|
is an example for using the MRGMSGCLG command to create a message catalog.</p>
|
|
<pre>MRGMSGCLG CLGFILE('/MYPRODUCT/MESSAGES?US')
|
|
SRCFILE('QSYS.LIB/MYLIB.LIB/MYSOURCE.FILE/US.MBR')
|
|
CLGCCSID(*SRCCCSID) SRCCCSID(*SRCFILE)
|
|
TEXT('Message catalog for USA')</pre>
|
|
<p>This example creates a message catalog into the stream file
|
|
US in directory /MYPRODUCT/MESSAGES using the source from MYLIB library in
|
|
file MYSOURCE and member US. The CCSID of the data in the message catalog
|
|
is the same as the CCSID tag of the source file.</p>
|
|
</div>
|
|
<div class="section" id="rbagsmsgcatsource__specchars"><a name="rbagsmsgcatsource__specchars"><!-- --></a><h4 class="sectiontitle">Special characters and escape sequences</h4><p>Text
|
|
strings can contain special characters and escape sequences as defined in
|
|
the following table.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><thead align="left"><tr><th valign="top" id="d0e137">Description of special characters</th>
|
|
<th valign="top" id="d0e139">Sequence</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td valign="top" headers="d0e137 ">\</td>
|
|
<td valign="top" headers="d0e139 ">\\</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e137 ">backspace</td>
|
|
<td valign="top" headers="d0e139 ">\b</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e137 ">carriage return</td>
|
|
<td valign="top" headers="d0e139 ">\r</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e137 ">form feed</td>
|
|
<td valign="top" headers="d0e139 ">\f</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e137 ">horizontal tab</td>
|
|
<td valign="top" headers="d0e139 ">\t</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e137 ">NEWLINE</td>
|
|
<td valign="top" headers="d0e139 ">\n</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e137 ">octal bit pattern</td>
|
|
<td valign="top" headers="d0e139 ">\ddd<div class="note"><span class="notetitle">Note:</span> The escape sequence \ddd consists of a backslash
|
|
followed by up to three octal digits that specify the value of the required
|
|
character. If the character following the backslash is not an octal digit,
|
|
the backslash and data following are included as part of the text.</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbagsmessagecatalogs.htm" title="The operating system can use message catalogs to store messages. Messages in a message catalog are grouped as sets. Each message has a unique number within a set. You can create a message catalog as a stream file, a source file member, or a user space object type from one or more source files.">Use message catalogs</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |