Скачать презентацию Chapter 5 Message Handling 1 Messages n Скачать презентацию Chapter 5 Message Handling 1 Messages n

56e3bba82757348105e8c8d8bd545bb3.ppt

  • Количество слайдов: 44

Chapter 5 Message Handling 1 Chapter 5 Message Handling 1

Messages n n n Messages used to command other processors. To request or deliver Messages n n n 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 n n n Most messaging is internal (called system-to-system). AS/400 communicates with Message Use n n n 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 3

Common Message Delivery Modes Break Notify DSPMSG A break message is a message that Common Message Delivery Modes Break Notify DSPMSG A break message is a message that interrupts the receiver’s interactive job and displays immediately “MW” or an icon that is displayed on the status line. Command to display messages Understanding AS/400 System Operations 4

Message Text Levels n Level one always displayed first. n n Shown at message Message Text Levels n Level one always displayed first. n n Shown at message line of screen. Use FI to display second level (or level 2) message - more descriptive. Understanding AS/400 System Operations 5

Predefined Message Additional Message Information Message ID. . . : CPF 2802 Severity. . Predefined Message Additional Message Information Message ID. . . : CPF 2802 Severity. . . . : 30 Message type. . . : Diagnostic Date sent . . . : 06/01/99 Time sent . . . : 03: 13: 45 Message. . : From-file MARGE in *LIBL not found. Cause. . . : Either the file or the library does not exist. Recovery . . . : Change the file name or the library name. Then try the request again. Bottom Press Enter to continue. F 3=Exit F 6=Print F 9=Display message details F 10=Display messages in job log F 12=Cancel F 21=Select assistance level Understanding AS/400 System Operations 6

Two Major Message Types n Informational n n Tells you something. Inquiry n Requires Two Major Message Types n Informational n n Tells you something. Inquiry n Requires an answer. Understanding AS/400 System Operations 7

Example – Inquiry Message Display Messages System: BIGBLUE Queue. . . : HOHLY#M Program. Example – Inquiry Message Display Messages System: BIGBLUE Queue. . . : HOHLY#M Program. . : *DSPMSG Library. . . : QUSRSYS Library. . . : Severity . . . : 00 Delivery . . . : *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 _______________________________ F 3=Exit F 11=Remove a message F 12=Cancel F 13=Remove all F 16=Remove all except unanswered F 24=More keys Understanding AS/400 System Operations 8

Messages Further Separated Into Two Types n n Predefined messages Impromptu message Understanding AS/400 Messages Further Separated Into Two Types n n Predefined messages Impromptu message Understanding AS/400 System Operations 9

Predefined Messages n n Commonly used messages. Messages stored in message file(s). Understanding AS/400 Predefined Messages n n Commonly used messages. Messages stored in message file(s). Understanding AS/400 System Operations 10

Example – Predefined Message Additional Message Information Message ID. . . : CPF 2204 Example – Predefined Message Additional Message Information Message ID. . . : CPF 2204 Severity. . . . : 40 Message type. . . : Diagnostic Date sent . . . : 06/01/99 Time sent . . . : 03: 45: 08 Message. . : User profile MARGE not found. Recovery . . . : Correct the user profile name or use the Create User Profile (CRTUSRPRF) command to create the user profile again. Then try the request again. Bottom Press Enter to continue. F 3=Exit F 6=Print F 9=Display message details F 10=Display messages in job log F 12=Cancel F 21=Select assistance level Understanding AS/400 System Operations 11

Predefined Messages Have a Definite Structure n n Identifier Message Text-Level 1 Message Text-Level Predefined Messages Have a Definite Structure n n Identifier Message Text-Level 1 Message Text-Level 2 Cause text n n Recovery text Message variables Message reply variables Severity Understanding AS/400 System Operations 12

Severity Code Informational message 00 Warning 10 Error 20 Severe Error 30 Sever error Severity Code Informational message 00 Warning 10 Error 20 Severe Error 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 60 Device Integrity 70 System Severity Codes Message sent to QSYSOPR, only: System status 60 Device Integrity 70 System alert 80 System integrity and user messages Action 90 99 Understanding AS/400 System Operations 14

Impromptu Messages n n n Free-form communication between one or more persons. SNDMSG (Send Impromptu Messages n n n Free-form communication between one or more persons. SNDMSG (Send Message). SNDBRKMSG (Send Break Message). Understanding AS/400 System Operations 15

Message Queues Understanding AS/400 System Operations 16 Message Queues Understanding AS/400 System Operations 16

Working With Message Queues Work with Message Queues (WRKMSGQ) Type choices, press Enter. Message Working With Message Queues Work with Message Queues (WRKMSGQ) Type choices, press Enter. Message queue . . . . ____ Name, generic*, *ALL Library . . *LIBL 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 Working With Message Queues Work with Message Queues Type options, press Enter. 1=Create 2=Change 4=Delete 5=Display messages 14=Clear Message Opt Queue Library Text A 98003873 QSYS Work Station Message Queue BIGBLUE QSYS Work Station Message Queue DSP 01 QSYS Work Station Message Queue GIL 1 QSYS Work Station Message Queue QCONSOLE QSYS Work Station Message Queue QHST QSYS QPADEV 000 A QSYS Work Station Message Queue QPADEV 000 B QSYS Work Station Message Queue QPADEV 000 C QSYS Work Station Message Queue QPADEV 000 D QSYS Work Station Message Queue More. . . Parameters for options 1, 2 and 5 or command ===> _________________________________ F 3=Exit F 4=Prompt F 5=Refresh F 9=Retrieve F 11=Display names only F 12=Cancel F 16=Repeat position to F 17=Position to F 24=More keys Understanding AS/400 System Operations 18

Message Files Work with Message Files (WRKMSGF) Type choices, press Enter. Message file. . Message Files Work with Message Files (WRKMSGF) Type choices, press Enter. Message file. . Name, generic*, *ALL Library . . *LIBL Name, *LIBL, *CURLIB. . . Understanding AS/400 System Operations 19

Message Files Work with Message Files Type options, press Enter. 1=Create 2=Change 4=Delete 5=Display Message Files 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 QC 2 MSGF QSYS ILE C RUN TIME MESSAGE FILE QDFUMSG QSYS More. . . Parameters for options 1, 2, 5, 12 and 13 or command ===> _________________________________ F 3=Exit F 4=Prompt F 5=Refresh F 9=Retrieve F 11=Display names only F 12=Cancel F 16=Repeat position to F 17=Position to F 24=More keys Understanding AS/400 System Operations 20

Break Inquiry Message Display Program Messages Job 137811/DAWSON#M/QPADEV 0004 started on 03/16/99 at 20: Break Inquiry Message Display Program Messages Job 137811/DAWSON#M/QPADEV 0004 started on 03/16/99 at 20: 06: 18 in subsystem CPF 2817 received by FIG 0501 at 200. (C D I R) Type reply, press Enter. Reply. . . _________________________________ F 3=Exit F 12=Cancel Understanding AS/400 System Operations 21

Level Two Message Additional Message Information Message ID. . . : CPA 0701 Severity. Level Two Message Additional Message Information Message ID. . . : CPA 0701 Severity. . . . : 99 Message type. . . : Inquiry Date sent . . . : 03/16/99 Time sent . . . : 20: 22: 57 Message. . : CPF 2817 received by FIG 0501 at 200. (C D I R) Cause. . . : Control language (CL) program FIG 0501 in library DAWSON#M detected an error at statement number 200. Message text for CPF 2817 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. F 3=Exit F 6=Print F 9=Display message details F 10=Display messages in job log F 12=Cancel F 21=Select assistance level Understanding AS/400 System Operations 22

Selecting a Predefined Message Work with Message Descriptions System: BIGBLUE Message file: QCPFMSG Library: 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 CPF 2817 40 Copy command ended because of error. _ CPF 2818 40 *FROMMBR value is not allowed on TOMBR parameter. _ CPF 2819 30 &3 not allowed on TOMBR for &1 in &2. _ CPF 2820 30 &3 not allowed on FROMMBR for inline file. _ CPF 2821 30 &3 not allowed on RCDFMT for &1 in &2. _ CPF 2822 30 COMPRESS(*NO) not valid for specified files. _ CPF 2823 30 Multiple from-members not allowed. _ CPF 2825 30 SRCOPT value not allowed for &1 in &2. More. . . Parameters or command ===> ______________________________ F 3=Exit F 5=Refresh F 6=Add F 12=Cancel F 24=More keys Understanding AS/400 System Operations 23

Message CPF 2817 Detail Select Message Details to Display System: BIGBLUE Message ID. . Message CPF 2817 Detail Select Message Details to Display System: BIGBLUE Message ID. . : CPF 2817 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 Selection ________________________________ F 3=Exit F 12=Cancel Understanding AS/400 System Operations 24

Message CPF 2817 Detail Display Formatted Message Text System: BIGBLUE Message ID. . : Message CPF 2817 Detail Display Formatted Message Text System: BIGBLUE Message ID. . : CPF 2817 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. Understanding AS/400 System Operations 25

Details of a Job Log Display All Messages System: BIGBLUE Job. . : QPADEV Details of a Job Log Display All Messages System: BIGBLUE Job. . : QPADEV 0004 User. . : DAWSON#M Number. . . : 137811 CPF 2817 received by FIG 0501 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 cpf 2817 4 > call fig 0501 From-file FILEA in DAWSON#M not found. Copy command ended because of error. CPF 2817 received by FIG 0501 at 200. (C D I R) ? C 4 > wrkmsgd cpg 2817 4 > wrkmsgd cpf 2817 More. . . Press Enter to continue. F 3=Exit F 5=Refresh F 12=Cancel F 17=Top F 18=Bottom Understanding AS/400 System Operations 26

Message Related Commands n n n Create and change messages queues (CRTMSGQ, CHGMSGQ, WRKMSGQ). Message Related Commands n n n 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 n n n Send impromptu messages (SNDMSG, SNDBRKMSG). Display messages and Message Related Commands n n n 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. Send a 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 ===> _____________________________________________________________________________________ F 3=Exit F 4=Prompt F 9=Retrieve F 12=Cancel F 13=Information Assistant F 16=AS/400 Main menu Understanding AS/400 System Operations 29

Sending Impromptu or User Messages n There are two commands: n n Send Message Sending Impromptu or User Messages n There are two commands: n n 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 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. . . . ____ Name, *SYSOPR Library . . . *LIBL Name, *LIBL, *CURLIB + for more values ____ ___*LIBL Message type. . *INFO _ *INFO, *INQ More. . . F 3=Exit F 4=Prompt F 5=Refresh F 12=Cancel F 13=How to use this display F 24=More keys Understanding AS/400 System Operations 31

Sending to Multiple Users SNDMSG MSG('Time to start our meeting in the + Computer 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 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 Display Messages System: BIGBLUE Queue. . . : QPADEV 0018 Program. Inquiry Message Screen Display Messages System: BIGBLUE Queue. . . : QPADEV 0018 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 F 3=Exit F 11=Remove a message F 12=Cancel F 13=Remove all F 16=Remove all except unanswered F 24=More keys Understanding AS/400 System Operations 34

SNDBRKMSG Command Screen Send Break Message (SNDBRKMSG) Type choices, press Enter. Message text. . SNDBRKMSG Command Screen Send Break Message (SNDBRKMSG) Type choices, press Enter. Message text. . Hey, let's do lunch! ___________________________________________________________________________________ ___________________________________________________________________________________ To work station message queue . QPADEV 001 Name, *ALLWS Library . . . *LIBL Name, *LIBL + for more values _____ *LIBL Message type. . *INFO, *INQ Message queue to get reply. . . QSYSOPR Name Library . . . *LIBL Name, *LIBL Bottom F 3=Exit F 4=Prompt F 5=Refresh F 10=Additional parameters F 12=Cancel F 13=How to use this display F 24=More keys Understanding AS/400 System Operations 35

Sending Messages to Special Users n n The SNDMSG and SNDBRKMSG commands can send Sending Messages to Special Users n n The SNDMSG and SNDBRKMSG commands can send to, TOUSR or TOMSGQ Parameter values: n n *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 Understanding AS/400 System Operations 37 System Reply List Understanding AS/400 System Operations 37

WRKMSGD Screen Work with Message Descriptions System: BIGBLUE Message file: QCPFMSG Library: QSYS Position WRKMSGD Screen 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 CPA 4002 99 Verify alignment on printer &3. (I G N R E C) _ CPA 4003 99 Form feed attachment &4 required on printer &3. (C _ CPA 4004 99 End of ribbon on printer &3. (C H I PAGE 1 -9999999) _ CPA 4005 99 End of ribbon on printer &3. (C I) _ CPA 4006 99 Volume &5 density is not correct. (C R) _ CPA 4007 99 Paper jam on printer &3. (C R) _ CPA 4008 99 Open cover on printer &3. (C H PAGE 1 -9999999) _ CPA 4009 99 Open cover on printer &3. (C R) More. . . Parameters or command ===> _____________________________________ F 3=Exit F 5=Refresh F 6=Add F 12=Cancel F 24=More keys Understanding AS/400 System Operations 38

Message CPA 4002 Text Display Formatted Message Text System: BIGBLUE Message ID. . : Message CPA 4002 Text Display Formatted Message Text System: BIGBLUE Message ID. . : CPA 4002 Message file. . . . : QCPFMSG Library . . : 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. F 3=Exit F 11=Display unformatted message text F 12=Cancel Understanding AS/400 System Operations 39

MSGDTA Layout Display Field Data Message ID. . : CPA 4002 Message file. . MSGDTA Layout Display Field Data Message ID. . : CPA 4002 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. F 3=Exit F 12=Cancel Understanding AS/400 System Operations 40

Change Reply List ADDRPYLE SEQNBR(12) MSGID(CPA 4002) RPY(*RQD)+ CMPDTA(‘QSYSPRT’ 21) ADDRPYLE SEQNBR(14) MSGID(CPA 4002) Change Reply List ADDRPYLE SEQNBR(12) MSGID(CPA 4002) RPY(*RQD)+ CMPDTA(‘QSYSPRT’ 21) ADDRPYLE SEQNBR(14) MSGID(CPA 4002) RPY(G) Understanding AS/400 System Operations 41

Resulting Reply List Understanding AS/400 System Operations 42 Resulting Reply List Understanding AS/400 System Operations 42

Reply List Commands CMDRPYL Reply List Commands Select one of the following: Commands 1. Reply List Commands CMDRPYL Reply List Commands Select one of the following: Commands 1. Add Reply List Entry ADDRPYLE 2. Change Reply List Entry CHGRPYLE 3. Remove Reply List Entry RMVRPYLE 4. Work with Reply List Entries WRKRPYLE Related Command Menus 5. Message Commands CMDMSG 6. Message Handling Commands CMDMSGHDL 7. Reply Commands CMDRPY Bottom Selection or command ===> __________________________________ F 3=Exit F 4=Prompt F 9=Retrieve F 12=Cancel F 16=Major menu (C) COPYRIGHT IBM CORP. 1980, 1998. Understanding AS/400 System Operations 43

Work With Reply List Work with System Reply List Entries System: BIGBLUE Type options, Work With Reply List Work with System Reply List Entries System: BIGBLUE Type options, press Enter. 2=Change 4=Delete Sequence Message Compare Opt Number ID Reply Compare Value Start 10 CPA 0700 D *NONE 20 RPG 0000 D *NONE 30 CBE 0000 D *NONE 40 PLI 0000 D *NONE 50 CPA 3349 G *NONE 3282 CPA 32 B 2 I 'Operations_Navigator' 1 Bottom Parameters or command ===> ____________________________________ F 3=Exit F 5=Refresh F 6=Add F 11=Display entire reply F 12=Cancel F 24=More keys (C) COPYRIGHT IBM CORP. 1980, 1998. Understanding AS/400 System Operations 44