Você está na página 1de 44

Chapter 5

Message Handling

Messages

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.
Understanding AS/400 System Operations 2

Message Use

Most messaging is internal (called system-to-system). AS/400 communicates with users via messages. Users can communicate to other users via messages.

Understanding AS/400 System Operations

Common Message Delivery Modes


Break A break message is a message that interrupts the receivers interactive job and displays immediately MW or an icon that is displayed on the status line.

Notify

DSPMSG

Command to display messages


Understanding AS/400 System Operations 4

Message Text Levels

Level one always displayed first.

Shown at message line of screen.

Use FI to display second level (or level 2) message - more descriptive.

Understanding AS/400 System Operations

Predefined Message
Additional Message Information

Message ID . . . . . . : Message type . . . . . : Date sent . . . . . . :


Message . Cause . . Recovery request . . . : . . . : . . . : again.

CPF2802 Diagnostic 06/01/99

Severity . . . . . . . :
Time sent . . . . . . :

30
03:13:45

From-file MARGE in *LIBL not found. Either the file or the library does not exist. Change the file name or the library name. Then try the

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

Understanding AS/400 System Operations

Two Major Message Types

Informational

Tells you something.

Inquiry

Requires an answer.

Understanding AS/400 System Operations

Example Inquiry Message


Display Messages

Queue . . . . . : Library . . . : Severity . . . :

HOHLY#M QUSRSYS 00

System: Program . . . . : Library . . . : Delivery . . . :

BIGBLUE *DSPMSG *NOTIFY

Type reply (if required), press Enter. From . . . : HOHLY#M 06/01/99 03:27:01 Would you Like a cup of coffee? Reply . . . sounds Great_________________

Bottom
______________________________________________________________ F3=Exit F11=Remove a message F12=Cancel F13=Remove all F16=Remove all except unanswered F24=More keys

Understanding AS/400 System Operations

Messages Further Separated Into Two Types


Predefined messages Impromptu message

Understanding AS/400 System Operations

Predefined Messages

Commonly used messages. Messages stored in message file(s).

Understanding AS/400 System Operations

10

Example Predefined Message


Additional Message Information

Message ID . . . . . . : Message type . . . . . : Date sent . . . . . . :


Message . Recovery Profile request

CPF2204 Diagnostic 06/01/99

Severity . . . . . . . :
Time sent . . . . . . :

40
03:45:08

. . . : User profile MARGE not found. . . . : Correct the user profile name or use the Create User (CRTUSRPRF) command to create the user profile again. Then try the 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

Understanding AS/400 System Operations

11

Predefined Messages Have a Definite Structure


Identifier Message Text-Level 1 Message Text-Level 2 Cause text

Recovery text Message variables Message reply variables Severity

Understanding AS/400 System Operations

12

Severity Code
Informational message Warning Error Severe Error 00 10 20 30

Sever error - abnormal end 40 of program function Abnormal end of job or 50


Understanding AS/400 System Operations 13

Severity Codes
Message sent to QSYSOPR, only: System status Device Integrity System alert System integrity and user messages Action 60 70 80 90 99
14

Understanding AS/400 System Operations

Impromptu Messages

Free-form communication between one or more persons. SNDMSG (Send Message). SNDBRKMSG (Send Break Message).

Understanding AS/400 System Operations

15

Message Queues
Message queue is like a mailbox for messages.
AS/400 QSYSOPR User message queues Display station message queues Special purpose message queues

Job message queue

QHST message queue

Understanding AS/400 System Operations

16

Working With Message Queues


Work with Message Queues (WRKMSGQ) Type choices, press Enter. Message queue . . . . . . . . Library . . . . . . . . . . ________ *LIBL Name, generic*, *ALL Name, *LIBL, *CURLIB...

Understanding AS/400 System Operations

17

Working With Message Queues


Work with Message Queues

Type options, press Enter. 1=Create 2=Change 4=Delete


Message Queue A98003873 BIGBLUE DSP01 GIL1 QCONSOLE QHST QPADEV000A QPADEV000B QPADEV000C QPADEV000D

5=Display messages

14=Clear

Opt

Library QSYS QSYS QSYS QSYS QSYS QSYS QSYS QSYS QSYS QSYS

Text Work Work Work Work Work Work Work Work Work Station Station Station Station Station Station Station Station Station Message Message Message Message Message Message Message Message Message Queue Queue Queue Queue Queue Queue Queue Queue 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

Understanding AS/400 System Operations

18

Message Files
Work with Message Files (WRKMSGF) Type choices, press Enter. Message file . . . . . . . . . Library . . . . . . . . . . Name, generic*, *ALL Name, *LIBL, *CURLIB...

*LIBL

Understanding AS/400 System Operations

19

Message Files
Work with Message Files

Type options, press Enter. 1=Create 2=Change 4=Delete 12=Work with message descriptions
Message File QALRMSG QBASMSG QBMGMSGF QCBLMSGE QCEEMSG QCPFMSG QCWXMSG QC2MSGF QDFUMSG

5=Display message descriptions 13=Change description

Opt

Library QSYS QSYS QSYS QSYS QSYS QSYS QSYS QSYS QSYS

Text

COBOL RUN TIME MESSAGE FILE

CUBE-3 MESSAGE FILE ILE C RUN TIME MESSAGE FILE

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

Understanding AS/400 System Operations

20

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

Understanding AS/400 System Operations

21

Level Two Message


Additional Message Information

Message ID . . . . . . : Message type . . . . . : Date sent . . . . . . :

CPA0701 Inquiry 03/16/99

Severity . . . . . . . :
Time sent . . . . . . :

99
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

Understanding AS/400 System Operations

22

Selecting a Predefined Message


Work with Message Descriptions System: Message file: QCPFMSG Library: QSYS BIGBLUE Position to . . . . . . . Message ID

Type options, press Enter. 2=Change 4=Delete 5=Display details Opt 5 _ _ _ _ _ _ _ Message ID CPF2817 CPF2818 CPF2819 CPF2820 CPF2821 CPF2822 CPF2823 CPF2825 Severity 40 40 30 30 30 30 30 30

6=Print

Message Text Copy command ended because of error. *FROMMBR value is not allowed on TOMBR parameter. &3 not allowed on TOMBR for &1 in &2. &3 not allowed on FROMMBR for inline file. &3 not allowed on RCDFMT for &1 in &2. COMPRESS(*NO) not valid for specified files. Multiple from-members not allowed. SRCOPT value not allowed for &1 in &2. More...

Parameters or command ===> ___________________________________________________________ F3=Exit F5=Refresh F6=Add F12=Cancel F24=More keys

Understanding AS/400 System Operations

23

Message CPF2817 Detail


Select Message Details to Display

System: BIGBLUE Message ID . . . Message file . . Library . . Message text . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

: CPF2817 : QCPFMSG . : QSYS : 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

Selection

_______________________________________________________________

F3=Exit

F12=Cancel

Understanding AS/400 System Operations

24

Message CPF2817 Detail


Display Formatted Message Text

System: BIGBLUE Message ID . . . . . . . . . : Message file . . . . . . . . : Library . . . . . . . . . :

CPF2817 QCPFMSG 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 .

Understanding AS/400 System Operations

25

Details of a Job Log


Display All Messages

Job . . :

QPADEV0004

User . . :

DAWSON#M

System: Number . . . :

BIGBLUE 137811

CPF2817 received by FIG0501 at 200. (C D I R) ? C 4 > wrkjoblog Command WRKJOBLOG in library *LIBL not found. Error found on WRKJOBLOG command. 4 > dspjoblog 4 > wrkmsgd cpf2817 4 > call fig0501 From-file FILEA in DAWSON#M not found. Copy command ended because of error. CPF2817 received by FIG0501 at 200. (C D I R) ? C 4 > wrkmsgd cpg2817 4 > wrkmsgd cpf2817 Press Enter to continue. F3=Exit F5=Refresh F12=Cancel F17=Top F18=Bottom

More...

Understanding AS/400 System Operations

26

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).

Understanding AS/400 System Operations

27

Message Related Commands

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).
Understanding AS/400 System Operations 28

Message Menu
MESSAGE Messages

System: BIGBLUE Select one of the following:


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

70. Related commands Selection or command ===> ______________________________________________________________________________ _____________________________________________________________________________________ F3=Exit F4=Prompt F16=AS/400 Main menu F9=Retrieve F12=Cancel F13=Information Assistant

Understanding AS/400 System Operations

29

Sending Impromptu or User Messages

There are two commands:


Send Message (SNDMSG) Send Break Message (SNDBRKMSG)

Understanding AS/400 System Operations

30

SNDMSG Command Screen


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 . . . . . . . . Library . . . . . . . . . . . + for more values Message type . . . . . . . . . . More... F3=Exit F4=Prompt F24=More keys ________ *LIBL ________ ___*LIBL *INFO _ Name, *SYSOPR Name, *LIBL, *CURLIB

*INFO, *INQ

F5=Refresh

F12=Cancel

F13=How to use this display

Understanding AS/400 System Operations

31

Sending to Multiple Users


SNDMSG MSG('Time to start our meeting in the + Computer Room.') TOMSGQ(JUNG JUAN JENNIFER + JUSTIN)

Understanding AS/400 System Operations

32

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)

Understanding AS/400 System Operations

33

Inquiry Message Screen


Queue . . . . . : Library . . . : Severity . . . : QPADEV0018 QSYS 00
Display Messages System: BIGBLUE Program . . . . : *DSPMSG Library . . . : 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 F13=Remove all F11=Remove a message F16=Remove all except unanswered F12=Cancel F24=More keys

Understanding AS/400 System Operations

34

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 F12=Cancel

F3=Exit F4=Prompt F5=Refresh F13=How to use this display

F10=Additional parameters F24=More keys

Understanding AS/400 System Operations

35

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
Understanding AS/400 System Operations 36

System Reply List


Sequence Message Compare Number Identifier Value 10 20 30 40 CPA0700 *NONE RPG0000 *NONE CBE0000 *NONE PLI0000 *NONE Reply D D D D Dump *YES *YES *YES *YES

Understanding AS/400 System Operations

37

WRKMSGD Screen
Message file: QCPFMSG
Work with Message Descriptions System: Library: QSYS Message ID BIGBLUE Position to . . . . . . .

Type options, press Enter. 2=Change 4=Delete 5=Display details Opt 5 _ _ _ _ _ _ _ Message ID CPA4002 CPA4003 CPA4004 CPA4005 CPA4006 CPA4007 CPA4008 CPA4009

6=Print

Severity Message Text 99 Verify alignment on printer &3. (I G N R E C) 99 Form feed attachment &4 required on printer &3. (C 99 End of ribbon on printer &3. (C H I PAGE 1-9999999) 99 End of ribbon on printer &3. (C I) 99 Volume &5 density is not correct. (C R) 99 Paper jam on printer &3. (C R) 99 Open cover on printer &3. (C H PAGE 1-9999999) 99 Open cover on printer &3. (C R) More... Parameters or command ===> _________________________________________________________________________ F3=Exit F5=Refresh F6=Add F12=Cancel F24=More keys

Understanding AS/400 System Operations

38

Message CPA4002 Text


Display Formatted Message Text System: BIGBLUE

Message ID . . . . . . . . . : Message file . . . . . . . . : Library . . . . . . . . . :

CPA4002 QCPFMSG QSYS

Message . . . . : Verify alignment on printer &3. (I G N R E C) Cause . . . . . : The forms may not be aligned correctly. The first line for the file is &4. Possible choices for replying to message . . . . . . . . . . . : I -- To continue printing aligned forms starting with the next line of the file, type an I. G -- To continue printing aligned forms skipping to the next form and printing the first line again, type a G. N -- To print the first line again on the next form and to verify the alignment, 1. Press Stop only if Start and Stop are two keys, or press Reset. 2. Advance the paper to the next form by pressing Form Feed/New Page. 3. Adjust the alignment with the forms adjust control. More... Press Enter to continue. F3=Exit F11=Display unformatted message text F12=Cancel

Understanding AS/400 System Operations

39

MSGDTA Layout
Display Field Data

Message ID . . . . . . . . . : Message file . . . . . . . . : Library . . . . . . . . . :

CPA4002 QCPFMSG QSYS


Decimal Positions Vary Length

Field &1 &2 &3 &4 &5 &6 &7 &8 &9 &10

Data Type *CHAR *CHAR *CHAR *BIN *CHAR *CHAR *CHAR *CHAR *CHAR *CHAR

Length 10 10 10 2 10 10 0 0 0 0

Dump *NO *NO *NO *NO *NO *NO *NO *NO *NO *NO More

Press Enter to continue. F3=Exit F12=Cancel

Understanding AS/400 System Operations

40

Change Reply List


ADDRPYLE SEQNBR(12) MSGID(CPA4002) RPY(*RQD)+ CMPDTA(QSYSPRT 21)

ADDRPYLE SEQNBR(14) MSGID(CPA4002) RPY(G)

Understanding AS/400 System Operations

41

Resulting Reply List


Sequence Number 10 12 14 20 30 40 Message Identifier CPA0700 CPA4002 CPA4002 RPG0000 CBE0000 PLI0000 Compare Value *NONE QSYSPRT 21 *NONE *NONE *NONE *NONE Reply D &RQD G D D D Dump *YES *NO *NO *YES *YES *YES

Understanding AS/400 System Operations

42

Reply List Commands


CMDRPYL Reply List Commands

Select one of the following:


Commands 1. Add Reply List Entry 2. Change Reply List Entry 3. Remove Reply List Entry 4. Work with Reply List Entries

ADDRPYLE CHGRPYLE RMVRPYLE WRKRPYLE

Related Command Menus 5. Message Commands 6. Message Handling Commands 7. Reply Commands

CMDMSG CMDMSGHDL CMDRPY

Bottom Selection or command ===> ___________________________________________________________________ F3=Exit F4=Prompt F9=Retrieve F12=Cancel (C) COPYRIGHT IBM CORP. 1980, 1998. F16=Major menu

Understanding AS/400 System Operations

43

Work With Reply List


Work with System Reply List Entries System: Type options, press Enter. 2=Change 4=Delete Sequence Number 10 20 30 40 50 3282 Message ID CPA0700 RPG0000 CBE0000 PLI0000 CPA3349 CPA32B2 BIGBLUE Compare Start

Opt

Reply D D D D G I

Compare Value *NONE *NONE *NONE *NONE *NONE 'Operations_Navigator'

Bottom Parameters or command ===> ________________________________________________________________________ F3=Exit F5=Refresh F6=Add F11=Display entire reply F12=Cancel F24=More keys (C) COPYRIGHT IBM CORP. 1980, 1998.

Understanding AS/400 System Operations

44

Você também pode gostar