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. Jim Mulder z/OS Diagnosis, Design, Development, Test IBM Corp. Poughkeepsie NY
"IBM Mainframe Assembler List" <[email protected]> wrote on 03/03/2021 06:07:33 PM: > From: "[email protected]" <[email protected]> > To: [email protected] > Date: 03/04/2021 12:23 AM > Subject: A Tale of Interleaving WTO messages > Sent by: "IBM Mainframe Assembler List" <[email protected]> > > Hello, > . > I need to understand why messages written to the JOB LOG, are > *NOT* displayed in the order they were issued. > , > Scenrio 1 > 10.39.38 DRIVER - Invoking Name/Token Services > 10.39.38 DRIVER - Name/Token Retrieved > 10.39.38 DRIVER - Call BAKR Routine > 10.39.38 FUNCTION - Enter > 10.39.38 FUNCTION - DEBUG DELAY > 10.39.38 FUNCTION - DEBUG DELAY > 10.39.38 FUNCTION - Transfer Complete > 10.39.38 DRIVER - Exit BAKR Routine > 10.39.38 FUNCTION - Structure Verified > 10.39.38 DRIVER - Last Function RC=00 > 10.39.38 FUNCTION - Function NTP_CALL Response Normal > 10.39.38 FUNCTION - Function ALESERVA Response Normal > 10.39.38 FUNCTION - Function ALESERVD Response Normal > 10.39.38 FUNCTION - Structure Verified SERVBLKL > , > . > Scenrio 2 > 16.10.54 DRIVER - Invoking Name/Token Services > 16.10.54 DRIVER - Name/Token Retrieved > 16.10.54 DRIVER - Call BAKR Routine > 16.10.54 FUNCTION - DEBUG DELAY > 16.10.54 FUNCTION - DEBUG DELAY > 16.10.54 FUNCTION - Enter > 16.10.54 FUNCTION - Transfer Complete > 16.10.54 FUNCTION - Structure Verified > 16.10.54 DRIVER - Exit BAKR Routine > 16.10.54 FUNCTION - Function NTP_CALL Response Normal > 16.10.54 DRIVER - Last Function RC=00 > 16.10.54 FUNCTION - Function ALESERVA Response Normal > 16.10.54 FUNCTION - Function ALESERVD Response Normal > 16.10.54 FUNCTION - Structure Verified SERVBLKL > 16.10.54 FUNCTION - SERVBLK Transfer Complete > , > . > , > I have two programs (1) a Driver Routine and (2) Various > Functions to be called, by the Driver module. > (The real program names have been changed to protect the Guilty) > , > , > The DRIVER Routine issues messages prefixed by the word "DRIVER". > The FUNCTION Routine issues messages prefixed by the word "FUNCTION". > , > The "Functions" really don't do much. > What I don't understand is why are there interleaving Messages > between the Driver and The Function execution. > , > . > The Driver Program Issues a LOAD for the Function Routine > The Driver Program issues a MODESET to supervisor state > The Driver issues BAKR instruction BAKR R0,R15 > Register 15 contains the entry point of the Function Routine. > . > The Function Routine issues a PR instruction to return control > to the Driver, when its processing is complete. > . > In Scenario 1 The ENTER message is the first message issued by > the Function Routine. > . > In Scenario 2 The ENTER message is the third message issued by > the Function Routine. > . > How is that possible ? > What is it that I don't understand ? > This is a Single TCB program (Task Control Bock) > There are no scheduling of SRBs or IRBs. > There ere NO ATTACH Macros issued. > . > Upon entry to FUNCTION > Register 1 is saved > Registers are not saved by FUNCTION since a Linkage Stack has been > created. > A storage OBTAIN is issued. > A WTO for the ENTER message is issued. > The WTO for the Function routine looks like: > WTO MF=(E,(R1)),LINKAGE=BRANCH > . > . > So Im am not understanding why in Scenario 1 the ENTER > Message appears as the first message issued by the Function > Routine, and in Scenario 2 the ENTER Message appears as the > third message issued by the Function Routine. > . > Also there are other interleaving messages issued by the Driver > Program while the Function Routine is still in control. > I don't understand why this occurs. > . > The Driver Routine does not get control until the Function > routine issues a PR instructions. Yet there are > interleaving messages issued by the Driver while The Function > Routine is in control. > . > .Is this a By-product of the BAKR instruction. > I dont thin so. > . > So what causes the interleaving of messages on the job log. > . > Paul > . > .
