| Create and Manage your own Message Queue (MSGQ) in AS400 |
Create and Manage your own Message Queue (MSGQ)
Create Message Queue(CRTMSGQ)
To create your own message queue, use the command Create Message Queue(CRTMSGQ) command.
Create Message Queue (CRTMSGQ)
Type choices, press Enter.
Message queue . . . . . . . . . MSGQ > MSGQ1
Library . . . . . . . . . . . > EASYCLASS1
Text 'description' . . . . . . . TEXT > 'Test Message Queue'
Additional Parameters
Force to auxiliary storage . . . FORCE *NO
Queue size: SIZE
Initial storage size . . . . . 3
Increment storage size . . . . 1
Maximum increments . . . . . . *NOMAX
Authority . . . . . . . . . . . AUT *LIBCRTAUT
Allow alerts . . . . . . . . . . ALWALR *NO
Coded character set ID . . . . . CCSID *HEX
Message queue full action . . . MSGQFULL *SNDMSG
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Message Queue MSGQ1 is created.
MAIN IBM i Main Menu
Select one of the following:
1. User tasks
2. Office tasks
3. General system tasks
4. Files, libraries, and folders
5. Programming
6. Communications
7. Define or change the system
8. Problem handling
9. Display a menu
10. Information Assistant options
11. IBM i Access tasks
90. Sign off
Selection or command
===>
F3=Exit F4=Prompt F9=Retrieve F12=Cancel F13=In
F23=Set initial menu
Object MSGQ1 type *MSGQ created in library EASYCLASS1.
WRKOBJ EASYCLASS1/MSGQ1
Work with Objects
Type options, press Enter.
2=Edit authority 3=Copy 4=Delete 5=Display authority 7=Rename
8=Display description 13=Change description
Opt Object Type Library Attribute Text
MSGQ1 *MSGQ EASYCLASS1 Test Message Queue
Bottom
Parameters for options 5, 7 and 13 or command
===> WRKOBJ EASYCLASS1/MSGQ1
F3=Exit F4=Prompt F5=Refresh F9=Retrieve F11=Display names and types
F12=Cancel F16=Repeat position to F17=Position to
Change Message Queue (CHGMSGQ)
You can change the attributes of your message queue using CHGMSGQ command.
Let's change the ccsid attribute to *JOB for the message queue MSGQ1.
Change Message Queue (CHGMSGQ)
Type choices, press Enter.
Message queue . . . . . . . . . > MSGQ1 Name, generic*, *USRPRF...
Library . . . . . . . . . . . > EASYCLASS1 Name, *LIBL, *CURLIB...
Delivery . . . . . . . . . . . . *SAME *SAME, *HOLD, *BREAK...
Severity code filter . . . . . . *SAME 0-99, *SAME
Text 'description' . . . . . . . *SAME
Additional Parameters
Break handling attributes:
Break handling program . . . . *SAME Name, *SAME, *DSPMSG
Library . . . . . . . . . . Name, *LIBL, *CURLIB
Allow other jobs to reply . . *NOALWRPY, *ALWRPY
Reset old messages . . . . . . . *NO *NO, *YES
Force to auxiliary storage . . . *SAME *SAME, *NO, *YES
Allow alerts . . . . . . . . . . *SAME *SAME, *NO, *YES
Coded character set ID . . . . . > *JOB 1-65535, *SAME, *MSG, *HEX...
Message queue full action . . . *SAME *SAME, *SNDMSG, *WRAP
Dislay Message(DSPMSG) or Work with Message (WRKMSG)
Display Messages
System:
Queue . . . . . : MSGQ1 Program . . . . :
Library . . . : EASYCLASS1 Library . . . :
Severity . . . : 00 Delivery . . . :
Type reply (if required), press Enter.
(No messages available)