Create or change a message queue

You can create or change your own user message queues.

To create your own user message queues, you use the Create Message Queue (CRTMSGQ) command. In addition, you also use the Change Message Queue (CHGMSGQ) command to change attributes of your message queue. To view the contents of the message queue, use the Display Message (DSPMSG) command or the Work Message (WRKMSG) command.

The attributes of a message queue are:

Note: When a workstation device description is created, the system establishes a message queue for the device to receive all action messages for the device. For workstation printers, tape drives, and APPC devices, the MSGQ parameter can be used to specify a message queue when creating a device description. If no message queue is specified for these devices, the default, QSYSOPR, is used as the message queue. All other devices are assigned to the QSYSOPR message queue when they are created.

The message queue defined in your user profile is known as a user message queue. When you sign on the system using your profile, the user message queue is put into the delivery mode specified in your user profile.

If your user message queue is in break or notify delivery mode while you are signed on a display station and then you sign on another display station, the user message queue will not change the delivery mode for the new sign on. User message queues (along with workstation message queues and the QSYSOPR message queue) cannot have their delivery mode changed by a job when the message queue is in break or notify delivery mode for a different job.

When you sign off the display station, or the job ends unexpectedly, the user message queue delivery mode is changed to hold mode, if the delivery mode of the user message queue is break or notify for this job. The user message queue delivery mode is also changed from break or notify mode to hold mode when you transfer to a secondary job. You can do this using the Transfer Secondary Job (TFRSECJOB) command or by pressing the System Request key and specifying option 1 on the System Request menu.

After transferring to a secondary job, you sign on using your user profile. Your user message queue is put into the delivery mode specified in your user profile. This allows the user message queue to transfer to the secondary job. You are then able to transfer back and forth between these two jobs and have your user message queue follow you.

However, if after transferring to an alternative job, you sign on using a user profile other than your own, the user message queue for the job from which you transferred is left in hold delivery mode. The user message queue for the user profile you signed on with is put in the delivery mode specified in that user profile. Because of this, your user message queue could be put into break or notify delivery mode by another user. If another user still has your user message queue in that delivery mode when you transfer back to the first job, your user message queue delivery mode cannot be changed back to the original delivery mode.

The QSYSOPR message queue is the message queue for the system operator, unless it has been changed. The above situation can occur for a system operator as well.

Related information
Create Message Queue (CRTMSGQ) command
Change Message Queue (CHGMSGQ) command
Display Message (DSPMSG) command
Work Message (WRKMSG) command