You are on page 1of 38

Message Handling

Presented By

Mohammad Sohel Parvez


Senior Principal Officer
IT Division, Head Office
IFIC Bank Ltd.
Message

What is Message?

Messages provide the means of communications between


the system and users.

All communication on the system takes place through the


use of the message handling facility.
Message Usage
• Messages used to command other processors.
• To request or deliver information.
• Every able addressable object has an attached unique
message queue.
• Messages are sent to recipient's message queue.
• Sent or received messages often end up in logs.
Message Originations

• Most messaging is internal (called system-to-system).


• AS/400 communicates with users via messages.
• Users can communicate to other users via messages.
Display Types of Message

There are two main types of messages that you, as a system operator, will send:
► Informational These messages do not require a reply.
► Inquiry An inquiry message requires a reply. It may also contain information.
Structure Types of Message
• Predefined messages
• Impromptu message
Predefined Messages
• Commonly used messages.
• Messages stored in message file(s).
Example – Predefined Message
Additional Message Information

Message ID . . . . . . : CPA0701 Severity . . . . . . . : 99


Message type . . . . . : Inquiry
Date sent . . . . . . : 03/16/99 Time sent . . . . . . : 20:22:57

Message . . . . : CPF2817 received by FIG0501 at 200. (C D I R)


Cause . . . . . : Control language (CL) program FIG0501 in library DAWSON#M
detected an error at statement number 200. Message text for CPF2817 is: Copy
command ended because of error.
Recovery . . . : This inquiry message can be avoided by changing the
program. Monitor for the error (MONMSG command) and perform error recovery
within the program. To continue, choose a reply value.
Possible choices for replying to message . . . . . . . . . . . . . . . :
C -- Cancel the CL program.
D -- Dump the CL program variables and cancel the CL program.
I -- Ignore the failing command.
R -- Try the failing command again.
Bottom
Press Enter to continue.

F3=Exit F6=Print F9=Display message details


F10=Display messages in job log F12=Cancel F21=Select assistance level
Predefined Messages Structure
■ Identifier
■ Message Text-Level 1
■ Message Text-Level 2
■ Cause text
■ Recovery text
■ Message variables
■ Message reply variables
■ Severity
Severity Code
Informational message 00

Warning 10

Error 20

Severe Error 30

Sever error - abnormal end of 40


program function
Abnormal end of job or 50
Severity Code
Message sent to QSYSOPR, only:
System status 60

Device Integrity 70

System alert 80

System integrity and user messages 90

Action 99
Impromptu Messages
• Free-form communication between one or more
persons.
• SNDMSG (Send Message).
• SNDBRKMSG (Send Break Message).
Message Delivery
Message Queue
Message Queue is an object that holds the messages just is like a mail box for messages
sent to a user. Each workstation has a message queue with the same name as the device
description name. Each user has a message queue with the same name as the user
profile name, and the system operator has a message queue named QSYSOPR.
Working With Message Queues
Work with Message Queues (WRKMSGQ)

Type choices, press Enter.

Message queue . . . . . . . . ________ Name, generic*, *ALL


Library . . . . . . . . . . *LIBL Name, *LIBL, *CURLIB...
Working With Message Queues Output
Work with Message Queues

Type options, press Enter.


1=Create 2=Change 4=Delete 5=Display messages 14=Clear

Message
Opt Queue Library Text

A98003873 QSYS Work Station Message Queue


BIGBLUE QSYS Work Station Message Queue
DSP01 QSYS Work Station Message Queue
GIL1 QSYS Work Station Message Queue
QCONSOLE QSYS Work Station Message Queue
QHST QSYS
QPADEV000A QSYS Work Station Message Queue
QPADEV000B QSYS Work Station Message Queue
QPADEV000C QSYS Work Station Message Queue
QPADEV000D QSYS Work Station Message Queue
More...
Parameters for options 1, 2 and 5 or command
===> _________________________________________________________________
F3=Exit F4=Prompt F5=Refresh F9=Retrieve F11=Display names only
F12=Cancel F16=Repeat position to F17=Position to F24=More keys
Message Files
Work with Message Files (WRKMSGF)

Type choices, press Enter.

Message file . . . . . . . . . Name, generic*, *ALL

Library . . . . . . . . . . *LIBL Name, *LIBL, *CURLIB...


Message Files Output
Work with Message Files

Type options, press Enter.


1=Create 2=Change 4=Delete 5=Display message descriptions
12=Work with message descriptions 13=Change description

Message
Opt File Library Text

QALRMSG QSYS
QBASMSG QSYS
QBMGMSGF QSYS
QCBLMSGE QSYS COBOL RUN TIME MESSAGE FILE
QCEEMSG QSYS
QCPFMSG QSYS
QCWXMSG QSYS CUBE-3 MESSAGE FILE
QC2MSGF QSYS ILE C RUN TIME MESSAGE FILE
QDFUMSG QSYS
More...
Parameters for options 1, 2, 5, 12 and 13 or command
===> __________________________________________________________________
F3=Exit F4=Prompt F5=Refresh F9=Retrieve F11=Display names only
F12=Cancel F16=Repeat position to F17=Position to F24=More keys
Break Inquiry Message
Display Program Messages

Job 137811/DAWSON#M/QPADEV0004 started on 03/16/99 at 20:06:18 in subsystem


CPF2817 received by FIG0501 at 200. (C D I R)

Type reply, press Enter.


Reply . . . __________________________________________________________________

F3=Exit F12=Cancel
Selecting a Predefined Message
Work with Message Descriptions
System: BIGBLUE
Message file: QCPFMSG Library: QSYS

Position to . . . . . . . Message ID

Type options, press Enter.


2=Change 4=Delete 5=Display details 6=Print

Opt Message ID Severity Message Text


5 CPF2817 40 Copy command ended because of error.
_ CPF2818 40 *FROMMBR value is not allowed on TOMBR parameter.
_ CPF2819 30 &3 not allowed on TOMBR for &1 in &2.
_ CPF2820 30 &3 not allowed on FROMMBR for inline file.
_ CPF2821 30 &3 not allowed on RCDFMT for &1 in &2.
_ CPF2822 30 COMPRESS(*NO) not valid for specified files.
_ CPF2823 30 Multiple from-members not allowed.
_ CPF2825 30 SRCOPT value not allowed for &1 in &2.
More...
Parameters or command
===> ___________________________________________________________
F3=Exit F5=Refresh F6=Add F12=Cancel F24=More keys
 
Message CPF2817 Detail
Select Message Details to Display

System: BIGBLUE
Message ID . . . . . . . . . : CPF2817

Message file . . . . . . . . : QCPFMSG

Library . . . . . . . . . : QSYS

Message text . . . . . . . . : Copy command ended because of error.

Select one of the following:

1. Display message text

2. Display field data

5. Display message attributes

30. All of the above


Message CPF2817 Detail - Text
Display Formatted Message Text

System: BIGBLUE
Message ID . . . . . . . . . : CPF2817

Message file . . . . . . . . : QCPFMSG

Library . . . . . . . . . : QSYS

Message . . . . : Copy command ended because of error.

Cause . . . . . : An error occurred while the file was being copied.

Recovery . . . : See the messages previously listed. Correct the


errors,
and then try the request again .
Message CPF2817 Detail – Field Data
Display Field Data

Message ID . . . . . . . . . : CPA4002
Message file . . . . . . . . : QCPFMSG
Library . . . . . . . . . : QSYS

Decimal Vary
Field Data Type Length Positions Length Dump
&1 *CHAR 10 *NO
&2 *CHAR 10 *NO
&3 *CHAR 10 *NO
&4 *BIN 2 *NO
&5 *CHAR 10 *NO
&6 *CHAR 10 *NO
&7 *CHAR 0 *NO
&8 *CHAR 0 *NO
&9 *CHAR 0 *NO
&10 *CHAR 0 *NO
More …
Press Enter to continue.

F3=Exit F12=Cancel
Message Related Commands
● Create and change messages queues (CRTMSGQ, CHGMSGQ, WRKMSGQ).
● Change message descriptions (CHGMSGD).
● Remove message descriptions (RMVMSGD).
● Create message files (CRTMSGF).
● Delete message files (DLTMSGF).
● Add message descriptions (ADDMSGD).
● Send impromptu messages (SNDMSG, SNDBRKMSG).
● Display messages and print messages descriptions (DSPMSG, DSPMSGD,
WRKMSGF).
● Add default replies for predefined messages using the system reply list
(WRKRPYLE).
Message Menu
MESSAGE Messages

System: BIGBLUE
Select one of the following:

1. Send a message
2. Send a break message
3. Display messages
4. Display system operator messages
5. Send a network message
6. Work with message queues
7. Create a message queue
8. Work with message descriptions

70. Related commands

Selection or command
===> ______________________________________________________________________________
_____________________________________________________________________________________

F3=Exit F4=Prompt F9=Retrieve F12=Cancel F13=Information Assistant


F16=AS/400 Main menu
Sending Impromptu or User Messages
■ There are two commands:
► Send Message (SNDMSG)
► Send Break Message (SNDBRKMSG)
SNDMSG
Send Message (SNDMSG)

Type choices, press Enter.

Message text . . . . . . . . . . I have finished my lab assignment. ______________


____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________

To user profile . . . . . . . . . JWILSON Name, *SYSOPR, *ALLACT...

Additional Parameters

To message queue . . . . . . . . ________ Name, *SYSOPR


Library . . . . . . . . . . . *LIBL Name, *LIBL, *CURLIB
+ for more values ________
___*LIBL
Message type . . . . . . . . . . *INFO _ *INFO, *INQ
More...
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
SNDMSG - Sending to Multiple Users

SNDMSG MSG('Time to start our meeting Now.')


TOMSGQ(JUNG JUAN JENNIFER JUSTIN)
SNDMSG - Sending Inquiry Messages

SNDMSG MSG('I need to shut down the system.


How much longer are you going to use it?')
TOUSR(LUIS)
MSGTYPE(*INQ)
Inquiry Message Screen
Display Messages
System: BIGBLUE
Queue . . . . . : QPADEV0018 Program . . . . : *DSPMSG
Library . . . : QSYS Library . . . :
Severity . . . : 00 Delivery . . . : *NOTIFY

Type reply (if required), press Enter.


From . . . : DAWSON#M 03/17/99 20:49:08
I need to shut down the system. How much longer are you going to use it?
Reply . . : _____________________________________________________________

Bottom
F3=Exit F11=Remove a message F12=Cancel
F13=Remove all F16=Remove all except unanswered F24=More keys
SNDBRKMSG Command Screen
Send Break Message (SNDBRKMSG)

Type choices, press Enter.

Message text . . . . . . . . . . Hey, let's do lunch!


___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
To work station message queue . QPADEV001 Name, *ALLWS
Library . . . . . . . . . . . *LIBL Name, *LIBL
+ for more values _________
*LIBL
Message type . . . . . . . . . . *INFO *INFO, *INQ
Message queue to get reply . . . QSYSOPR Name
Library . . . . . . . . . . . *LIBL Name, *LIBL

Bottom
F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel
F13=How to use this display F24=More keys
Sending Messages to Special Users
• The SNDMSG and SNDBRKMSG commands
can send to,
• TOUSR or TOMSGQ Parameter values:
– *SYSOPR - system operator
– *ALLUSR - all users
– *ALLACT - all users currently signed on (NOTE:
NOT SNDBRKMSG command)
– *ALLWS - all workstations
Ways to Receive Messages
Message Display
Message Display – Break Mode
Inquiry Message Reply
System Messages Reply
Deletion of Messages

You might also like