Qsysopr Break Handling Programme

Qsysopr Break Handling Programme Average ratng: 7,7/10 3562 reviews

Well, sure enough, you're right about being in break mode. I screwed up, sorry.

The second element indicates whether or not to allow other jobs to reply to messages on the message queue when it is placed in *BREAK delivery mode with a break handling program other than *DSPMSG specified. Because the QSYSOPR message queue receives messages that require manual operator action, only. Display Messages System: E1277E3B Queue.....: QSYSOPR Program....: *DSPMSG Library...: QSYS Library...: Severity....: 95 Delivery...: *BREAK Type reply (if required), press Enter. Load the next volume in optical device OPT01 (X G) Reply.... G Figure 11-33 Media load break message 8. After all of the. System operator message queue The system operator message queue (QSYSOPR) is a special message queue to which the system sends messages. A break-handling program is one that is automatically called when a message arrives at a message queue (in this case at QSYSMSG) that is in *BREAK mode.

Qsysopr Break Handling Programmers

The break handler program has to have a job to run in. Whoever issues the command provides the 'context' for the break handler. If the job that issues the CHGMSGQ command ends, the break-handler-program function stops working. The section from the V4R3 CL Programmers Guide on break handlers is attached below. I would be a little careful about insisting that you have to stay logged on to make it work. If Jeff puts the CHGMSGQ in the front of the backup job, he won't have to stay logged on. He could also submit another job that does the CHGMSGQ then waits forever.

Break

If a message arrives on the queue, the break handler will run inside that job. When the backup job completes, it could send a 'die' message to the message queue. The break handler could recognize that message and kill the job that it is running in. I am wondering about the 'initialize' inquiry messages being sent by the job. Are those sent to QSYSOPR no matter what?

That sounds wrong but it would explain why the messages always break without triggering the program. Another possible reason - the severity level may be set above the severity of the message thus preventing the break handler from starting. I am also thinking about the add reply list entry (ADDRPYLE) command. You can put message IDs in there and specify a particular reply or tell it to use a default. Seems to me like it might work pretty well to add a reply list entry at the beginning of the backup job and remove the RPYLE when you finished.

Whenever the message was sent, the system would automatically reply with INZ or whatever. Jeff, could you make that work? Again, sorry about the mistake. I hope that this helps a little. 8.4 Break-Handling Programs A break-handling program is one that is automatically called when a message arrives at a message queue that is in.BREAK mode. Both the name of the program and the break delivery name must be specified on the same Change Message Queue (CHGMSGQ) command. Although the program is specified on the CHGMSGQ command, it is one or more procedures within the program that processes the message.

A procedure within this program must run a Receive Message (RCVMSG) command to receive the message. To receive and handle the message, the user-defined program called to handle messages for break delivery is passed parameters (more specifically, the first procedure to run within the program is passed these parameters). The parameters identify the message queue and the message reference key (MRK) of the message causing the break. See the Break Handling exit program in the System API Reference, SC41-5801 book, for a list of the parameters. If the break-handling program is called, it interrupts the job in which the message occurred and runs.

When the break-handling program ends, the original program resumes processing. The following program (PGMA), which consists of only this one procedure, is an example of a break-handling program. PGM PARM(&MSGQ &MSGLIB &MRK) DCL VAR(&MSGQ) TYPE(.CHAR) LEN(10) DCL VAR(&MSGLIB) TYPE(.CHAR) LEN(10) DCL VAR(&MRK) TYPE(.CHAR) LEN(4) DCL VAR(&MSG) TYPE(.CHAR) LEN(75) RCVMSG MSGQ(&MSGLIB/&MSGQ) MSGKEY(&MRK) + MSG(&MSG). ENDPGM After the break-handling program is created, running the following command connects it to the QSYSMSG message queue.

CHGMSGQ MSGQ(QSYS/QSYSMSG) DLVRY(.BREAK) PGM(PGMA) Notes: 1. When messages are handled, they should be removed from the message queue. When a message queue is put in break mode, any message on the queue will cause the break-handling program to get called. The procedure or program receiving the message should not be coded with a wait-time other than zero to receive a message. You can specify a value other than zero for the wait parameter with the Receive Message (RCVMSG) command.

Qsysopr break handling programmer

The message arrival event cannot be handled by the system while the job is running a break-handling event. An example of a break-handling program is to have the program send a message, which is normally sent to the QSYSOPR queue, to another queue in place of or in addition to QSYSOPR. The following is an example of a user-defined program (again with only one procedure) to handle break messages. The display station user does not need to respond to the messages CPA5243 (Press Ready, Start, or Start-Stop on device &1) and CPA5316 (Verify alignment on device &3) when this program is used.

Posted :