Upon further review, JES2  sets TCBNOIRB to prevent
its IRB from being interrupted by another IRB, and its method
of processing its message queue should keep the messages in 
order.   Futhermore, I wrote a testcase to issue many 
LINKAGE=BRANCH   WTOs, and I have not seen any 
instances of out of order messages in the joblog on a
JES2 system.  Are you using JES3?   Are you sure that
all of your WTOs specify LINKAGE=BRANCH? 


Jim Mulder z/OS Diagnosis, Design, Development, Test  IBM Corp. 
Poughkeepsie NY

Jim Mulder/Poughkeepsie/IBM wrote on 03/04/2021 03:09:21 PM:

> From: Jim Mulder/Poughkeepsie/IBM
> To: "IBM Mainframe Assembler List" <[email protected]>
> Date: 03/04/2021 03:09 PM
> Subject: Re: A Tale of Interleaving WTO messages
> 
>  When the  WTO LINKAGE=SVC is issued in the 
> Console address space, A broadcast SSI WTO call is done.
> JES2 has a WTO function routine (that's how WTOs get into the 
> job log). The JES2 routine sees that it is running in the Console 
> address space, and thus it does not have addressability  to the 
> job log control blocks and buffers in your job's address space. 
> So it schedules an SRB to your job's address space.  The SRB
> routine schedules an IRB to the initiator task in your address 
> space, and the IRB routine adds the message to your job log. 
> The dispatching and execution of the SRBs, and the 
> dispatching of the IRBs,  for messages issued close together, 
> provides opportunity for the messages to not be added to the
> job log in the same order as the branch entry WTOs. 
> 
> Jim Mulder z/OS Diagnosis, Design, Development, Test  IBM Corp. 
> Poughkeepsie NY

> "IBM Mainframe Assembler List" <[email protected]> 
> wrote on 03/04/2021 09:13:09 AM:
> 
> > From: "[email protected]" <[email protected]>
> > To: [email protected]
> > Date: 03/04/2021 11:07 AM
> > Subject: A Tale of Interleaving WTO messages
> > Sent by: "IBM Mainframe Assembler List" 
<[email protected]>
> > 
> > .
> > .
> > Jim Mulder wrote,
> > >When you do a WTO with LINKAGE=BRANCH, the request is added 
> > >to a message queue which is serviced asynchronously  by a TCB 
> > >in the CONSOLE address, which issues WTO LINKAGE=SVC for 
> > >each queued message.  So you should have no expectations 
> > >about the delivery ordering between a WTO with
> > >LINKAGE=SVC and a WTO with LINKAGE=BRANCH. 
> > >
> > >
> > If all the WTOs with LINKAGE=BRANCH are submitted from the same 
address
> > space and from the same TCB, why wouldn't these WTO messages arrive 
> > in sequence and get queued in the Console
> > Address Space in the order they were submitted ?
> > .
> > Paul 

Reply via email to