CL Programming
A message is a communication sent from one user, program, or
procedure to another. Most data processing systems provide
communications between the system and the operator to handle errors and other
conditions that occur during processing. OS/400 also provides message
handling functions that support two-way communications between programs and
system users, between programs, between procedures within a program, and
between system users. Two types of messages are supported:
- Immediate messages, which are created by the program or system user when
they are sent and are not permanently stored in the system.
- Predefined messages, which are created before they are used. These
messages are placed in a message file when they are created, and retrieved
from that file when they are used.
Because messages can be used to provide communications between programs,
between procedures in a program, and between programs and users, using the
OS/400 message handling functions should be considered when developing
applications. The following concepts of message handling are important
to application development:
- Messages can be defined in messages files, which are outside the programs
that use them, and variable information can be provided in the message text
when a message is sent. Because messages are defined outside the
programs, the programs do not have to be changed when the messages are
changed. This approach also allows the same program to be used with
message files containing translations of the messages into different
languages.
- Messages are sent to and received from message queues, which are separate
objects on the system. A message sent to a queue can remain on the
queue until it is explicitly received by a program or work station
user.
- A program can send messages to a user who requested the program regardless
of what work station that user has signed on to. Messages do not have
to be sent to a specific device; one program can be used from different
work stations without change.
See the Globalization topic in the System overview,
planning, and installation category of the iSeries Information Center
for information on Coded Character Set Identifier (CCSID) for menus, messages,
and message descriptions.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.