System for, and method of, off-loading network transactions from a mainframe to an intelligent input/output device, including off-loading message queuing facilities6141701Abstract A system for, and method of, off-loading network transactions from a mainframe to an intelligent input/output device, including off-loading message queuing facilities. A storage controller has a processor and a memory, in which the controller receives I/O commands having corresponding addresses. In the controller memory, a communication stack is provided for receiving and transmitting information on a network. In addition, a message queue facilities (MQF) is provided that cooperates with the communication stack and that is responsive to a message queue verb. The MQF causes the communication stack to provide information to a queue in the MQF or causes a queue in the MQF to provide information to the communication stack. Moreover, interface logic is provided in the controller memory and is responsive to the I/O commands, to determine whether an I/O command is within a first set of predetermined I/O commands. If so, the interface logic maps the I/O command to a corresponding message queue verb and queue to invoke the MQF. In this fashion, the MQF may cooperate with the communication stack to send and receive information corresponding to the verb, while off-loading the processing from a computer client (e.g., a mainframe) of the storage controller. Claims I claim: Description BACKGROUND OF THE INVENTION
TABLE A
__________________________________________________________________________
Description Branch
Vectoring to Mapping Logic 112 SQL UOW >4K Table Vector
__________________________________________________________________________
Address Watching Logic -
Diagram 1-110
Put Single Message N N N Tbl.-1 3
Put Single Message Y N N Tbl.-2 4
Put Single Message Y N Y Tbl.-3 5
Put Multiple Messages Y Y N Tbl.-4 6
Put Multiple Messages Y Y Y Tbl.-5 7
Get Single Message N N N Tbl.-6 8
Get Single Message Y N N Tbl.-7 9
Get Single Message Y N Y Tbl.-8 10
Get Multiple Messages Y Y N Tbl.-9 11
Get Multiple Messages Y Y Y Tbl.-10 12
Browse First Message N N N Tbl.-11 13
Browse Next Message Loop N N N Tbl.-12 14
Browse Message using Cursor Y N N Tbl.-13 15
Get Single Message using Message Y N N Tbl.-14 16
Identifier
Get Single Message with options Y N N Tbl.-15 17
Put Single Message with options Y N N Tbl.-16 18
Queue Watching Logic N/A N/A N/A N/A 19
Put Single MQF Control Message to Master Y N N Tbl.-17 & 20
Control Queue to examine or alter specified 18
queue's state
__________________________________________________________________________
Legend:
SQL = Shared Queue Locking
UOW = Unit of Work
>4K = Message is greater than 4K Bytes
Vector = Address Watching Status Table Branch Vector
FIG. 2 shows the address watching logic 110 that is activated by the DSTC 108A channel program collection logic. The address watching logic 110 is activated at step 200 once the channel program collection logic 108a has analyzed the channel program from the channel interface 104 and determined what I/O command is being executed on the accompanying MCHR address. Processing proceeds to step 205 where the MCHR address is rang checked against values stored in the address watching logic table 110a. If the MCHR fails the range check the logic then proceeds to step 210 in which the flow of control is caused to return to the DSTC engine 108. If it passes the address range test audit, then processing proceeds with step 210. Step 210 depending upon embodiment either searches, hashes, or indexes into the address watching logic table 110a to find the proper MCHR addresses entry. In step 220 if there is not an entry for the MCHR address or if there is an entry but it does not have a branch vector in it from Table A, then processing proceeds to step 225. In step 225 the flow of control is caused to return to the DSTC engine 108. If step 220 found a valid entry and branch vector, then in steps 240 and 250 the address found in the branch vector field of the MCHR's address watching status table 110a entry is branched to. This branch address represents unique logic routines in the mapping logic 112. There is no expected return to this logic, that is the address watching logic 110, from the branch to the mapping logic 112. FIG. 3 shows the logic for handling single Put commands in which the message is less than 4K bytes. (The largest record size supported by TPF mainframes is 4KB.) This logic is invoked when one of the buffered channel program commands of Table 1 is detected by the mapping logic 112 in conjunction with an MCHR address associated with single Puts, as identified in table 110a.
TABLE 1
______________________________________
Buffered Channel
Description MQSeries Verb Program Command
______________________________________
Sequence of Verbs to
lock and Put messages to
a Put queue
MQOPEN Any Activity
Lock the queue against N/A N/A
shared update activity
Put a message to the MQPUT FILEC
queue
Unlock queue for shared N/A UNFRC
update activity if Put is
aborted
______________________________________
The logic begins in step 300 and proceeds to step 305. In step 305, the logic determines whether the named queue is open. The name for the queue is retrieved from the entry in address table 110a having the MCHR address in the buffered channel program. This may be determined with known API calls to the MQF 114, but a preferred embodiment maintains status indicators in table 110a. The table logic 110a includes association logic (not shown) so that all MCHR entries for a given named queue are accessed and modified consistently. Thus, if a queue is opened when performing a single Put to "example-q" by using corresponding MCHR address A, the other MCHR entries for "example-q" will be updated to "open," as well; thus, MCHR address B which corresponds to large Puts (i.e., greater than 4KB) will be updated to open status as well, since this address also maps to "example-q." If the named queue is not open, the logic proceeds to step 310 in which the named queue is opened with known API calls to the MQF 114. The mapping logic 112 cooperatively maintains both the address watching logic status table 110a and the queue watching logic status table 118a respectively with the address watching logic 110 and the queue watching logic 118. Thus, at this point, the mapping logic 112 will cause tables 110a and 118a to be modified for all relevant entries. The logic then proceeds to step 325. If the named queue is open, the logic proceeds to step 325. In step 325, the logic determines whether the channel program command is a FILEC, that is, a write without locking command. If the command analyzed in step 325 is a FILEC, the logic proceeds to step 330 in which the data payload of the buffered channel command is Put to the corresponding named queue, using the known API of the MQF. The queue name is provided from table 110a. The logic then proceeds to step 335 in which the flow of control is caused to return to the DASD engine 108. If the command in step 325 is not a FILEC, the logic proceeds to step 340. In step 340, the logic causes the flow of control to return to the DASD engine 108 and an error condition is signaled. In this scenario, a channel program command has been received which is not recognized. FIG. 4 shows the logic for handling single Put commands to a shared queue in which the message is less than 4K bytes. This logic is invoked when one of the buffered channel program commands of Table 2 is detected by the mapping logic 112 in conjunction with an MCHR address associated with single Puts, as identified in table 110a. The logic, as will be explained below, supports single Puts and also Puts to a shared MQF queue. The "shareability" of the queue is a consequence of the functionality extended by the mapping logic 112 shown in FIG. 4 and not inherent in MQF 114.
TABLE 2
______________________________________
Buffered Channel
Description MQSeries Verb Program Command
______________________________________
Sequence of Verbs to
lock and Put messages to
a Put queue
MQOPEN Any Activity
Lock the queue against N/A FIWHC
shared update activity
Put a message to the MQPUT FILUC
queue
Unlock queue for shared N/A UNFRC
update activity if Put is
aborted
______________________________________
The logic begins in step 400 and proceeds to step 405. In step 405, the logic determines whether the named queue is open. The name for the queue is retrieved from the entry in address table 110a having the MCHR address in the buffered channel program. This may be determined with known API calls to the MQF 114, but a preferred embodiment maintains status indicators in table 110a. If the named queue is not open, the logic proceeds to step 410 in which the named queue is opened with known API calls to the MQF 114. The mapping logic 112 cooperatively maintains both the address watching logic status table 110a and the queue watching logic status table 118a respectively with the address watching logic 110 and the queue watching logic 118 to modify the queue status. If the named queue is open, the logic proceeds to step 415. In step 415, the logic analyzes the buffered channel program command to determine whether it is FIWHC, that is, a blocked read and lock. (The "blocked" aspect refers to mainframe-side state and involves no blocking aspect on the I/O-side.) This command is used in instances where the queue is shareable among multiple mainframes connected to the I/O device 100. The preferred embodiment uses the FIWHC because it will naturally trigger a lock on the MCHR address record through the ordinary processing of the lock facility 108c, as explained below. The lock precludes other mainframes from accessing the corresponding MCHR record until the lock is released (unheld). If the command analyzed in step 415 is a FIWHC command, the logic proceeds to step 420, in which the flow of control is caused to return to the DASD engine 108 and eventually the lock facility 108c which will lock the record and thus prevent other entities from accessing the MCHR address corresponding to the queue. If the command analyzed in step 415 is not a FIWHC, the logic proceeds to step 425 in which the logic determines whether the channel program command is a FILUC, that is, a write with unlock command. If the command analyzed in step 425 is a FILUC, the logic proceeds to step 430 in which the data payload of the buffered channel command is Put to the corresponding named queue, using the known API of the MQF. The queue name is provided from table 110a. The logic then proceeds to step 435 in which the flow of control is caused to return to the DASD engine 108 and eventually the lock facility 108c which will unlock the record and thus allow other entities to access the MCHR address corresponding to the queue. If the command in step 425 is not a FILUC, the logic proceeds to step 440 in which the logic determines whether the channel program command is an UNFRC, that is, an unlock command. This command would be used by the mainframe if it needed to abort a Put to a shared queue, after it had already locked the queue. If the command analyzed in step 440 is an UNFRC, the logic proceeds to step 445 in which the flow of control is caused to return to the DASD engine 108 and eventually the lock facility 108c which will unlock the record and thus allow other entities to access the MCHR address corresponding to the queue. If the command analyzed in step 440 is not an UNFRC the logic proceeds to step 450 in which the flow of control is caused to return to the DASD engine 108 and in which an error condition is signaled. In this scenario, a channel program command has been received which is not recognized. FIG. 5 shows the logic for handling a single "Put" command in which the message may be more than 4K bytes. The logic is invoked when one of the buffered channel program commands of table 3 is detected by mapping logic 112 in conjunction with an MCHR address associated with single Puts, as identified in table 110a. The logic, as will be explained below, supports Puts to a shared MQF queue. The "shareability" of the queue is a consequence of the functionality extended by the mapping logic 112. Mainframe software may segment a message that is greater than 4K Bytes into a chain of 4K record segments. A preferred embodiment uses conventional TPF record processing to implement the segmentation and reassembly of long messages. Individual records in the TPF chain are filed at known file pool addresses resident on the DASD of the modified DSTC 100. This TPF record chaining is known. It employs a standard record header with forward and back chaining fields that contain the MCHR addresses respectively of the next and first previous records in chain. Once the chain is filed into the DSTC's conventional pool storage, the first record in the chain (known as the prime or head of chain) may be Put to queue, as explained below. There are several approaches to embodying the handling of segmented long messages, including using designated MQF queues for long message staging.)
TABLE 3
______________________________________
Buffered Channel
Description MQSeries Verb Program Command
______________________________________
Sequence of Verbs to This logic assumes the
Lock and Put Long long message's chain of
Message to a Put Queue message segments has
been filed using pool
MCHRs on DSTC 100
Open Queue MQOPEN Any Activity
Lock the Queue against N/A FIWHC
shared Update Activity
Put the first segment of MQPUT FILUC
the long message chain
to (the head or prime of
chain) to queue as the
first message in a unit of
work
Unlock the queue for UNFRC
shared update activity if
Put is aborted
______________________________________
The logic begins in step 500 and proceeds to step 505. In step 505, the logic determines whether the named queue is open. If the named queue is not open, the logic proceeds to step 510 in which the named queue is opened with known API calls to the MQF 114. The mapping logic 112 cooperatively maintains both the address watching logic status table 110a and the queue watching logic status table 118a respectively with the address watching logic 110 and the queue watching logic 118 to modify the queue status. If the named queue is open, the logic proceeds to step 515. In step 515, the logic analyzes the buffered channel program command to determine whether it is FIWHC, that is, a blocked read and lock. If the command analyzed in step 515 is a FIWHC command, the logic proceeds to step 520, in which the flow of control is caused to return to the DASD engine 108 and eventually the lock facility 108c which will lock the record and thus prevent other entities from accessing the MCHR address corresponding to the queue. If the command analyzed in step 515 is not a FIWHC, the logic proceeds to step 525 in which the logic determines whether the channel program command is a FILUC, that is, a write with unlock command. The FILUC command is used as the second command in a series of commands issued for Puts to shared queues. If the command analyzed in step 525 is a FILUC, the logic proceeds to step 527 in which the data payload of the buffered channel command is further analyzed. In step 527, the logic analyzes the known forward and back chaining fields of the record in the data payload. As part of step 527, the current record is sequentially copied into the mapping logic's 112 internal long message staging cache 112a. If the mapping logic 112 determines that the known forward chain field in the TPF standard record header is set to binary zeroes the current record is the end of chain. A nonzero forward chain field in the current record is the known MCHR pool address that points to the next record in chain. The mapping logic 112 uses the forward chain MCHR address to set up the DSTC 108 engine to stage an internal FINWC command of the forward chained record. It then triggers the DASD engine 108 to fetch it. The forward chained record fetched by the DASD engine 108 is copied by the mapping logic 112 as the next sequential record into the internal long message staging cache 112a. This scanning process of determining if there is a forward chain and then fetching it to the internal long message staging cache 112a continues until a forward chain field of binary zeroes is found indicating end of chain. Processing proceeds to step 530. In step 530, the logic analyzes the record chain by stepping sequentially through each record saved in the internal long message staging cache 112a. By using the MCHR addresses in both forward and backward chaining fields of each record, the chain of records can be traversed logically both forward and backwards. This action insures that the physical sequence of the chain as it lies in the internal long message staging cache 112a properly matches its logical sequence. In step 530, the logic reassembles the message segments residing in the chain of records into one large message. (The DASD engine 108 and the logic of the preferred embodiment, unlike TPF, are not limited to 4K records). Again by stepping sequentially through each record saved in the internal message staging cache 112a, each standard TPF record header is stripped off and the remaining message segment is concatenated into the long message. The processing proceeds to step 535 in which the logic determines whether the reassembly was successful. If so, the logic proceeds to step 540; otherwise it is a bad chain and processing continues with step 590 in which the flow of control is caused to return to the DASD engine 108 and an error condition is signaled. In step 540, the logic Puts the long message from the internal long message staging cache 112a to the open queue in the MQF 114. The logic then proceeds to step 570 in which the flow of control is caused to return to the DASD engine and eventually the lock facility 108c which will unlock the record associated with the MCHR of the FILUC and thus allow other entities to access the MCHR address corresponding to the queue. (Although not detailed in this embodiment, instead of reassembling the long message in the mapping logic 112, it is possible to sequentially Put each of the records in chain to the MQF 114 as a unit of work and have an off board processor reassemble them into a single long message.) If the command in step 525 is not a FILUC, the logic proceeds to step 560. In step 560, the logic then analyzes to the buffered channel command. If the command analyzed in step 560 is an UNFRC the logic proceeds to step 565 in which the flow of control is caused to return to the DASD engine 108 and eventually the lock facility 108c which will unlock the record and thus allow other entities to access the MCHR address corresponding to the queue. If the command analyzed in step 560 is not an UNFRC the logic proceeds to step 590 in which the flow of control is caused to return to the DASD engine 108 and in which an error condition is signaled. In this scenario, a channel program command has been received which is not recognized. FIG. 6 shows the logic for handling multiple Put commands as a transactional unit of work in which the individual messages that make up the unit of work are less than 4K bytes each. This logic is invoked when one of the buffered channel program commands of Table 4 is detected by mapping logic 112 in conjunction with an MCHR address associated with multiple Puts. The logic, as will be explained below, supports Puts and also Puts to a shared MQF queue. The "shareability" of the queue is a consequence of the functionality extended by the mapping logic 112.
TABLE 4
______________________________________
Buffered Channel
Description MQSeries Verb Program Command
______________________________________
Sequence of Verbs to
lock and Put messages to
a Put queue as unit of
work
Open queue MQOPEN Any Activity
Lock the queue against N/A HOLDC
shared update activity
and indicate unit of
work - Indicate Sync-
point
Put a message to the MQPUT (first with FILEC
queue (first message sync-point)
with sync-point) Put (subsequent without
synch-point)
Put the last message to MQPUT (the last FILUC
queue committing the message)
unit of work and MQCMIT
unlocking the queue to
other shared activity
Rollback the unit of MQBACK UNFRC
work and unlock the
queue for shared update
activity if unit of work is
aborted
______________________________________
The logic begins in step 600 and proceeds to step 605. In step 605, the logic determines whether the named queue is open. If the named queue is not open, the logic proceeds to step 610 in which the named queue is opened with known API calls to the MQF 114. The mapping logic 112, at this point, cooperatively maintains both the address watching logic status table 110a and the queue watching logic status table 118a respectively with the address watching logic 110 and the queue watching logic 118 to modify the queue status. The logic then proceeds to step 615. If the named queue is open, the logic proceeds to step 615. In step 615, the logic analyzes the buffered channel program command to determine whether it is HOLDC, that is, hold and lock the MCHR address. This command is used to indicate that a SyncPointed unit of work from a specific mainframe is being initiated. Since the operation to the queue is a series of message Puts that are to be seen as a single unit of work, the operations must be "framed" with a SyncPoint to start the frame and either a Commit or Rollback to end the frame. The preferred embodiment uses the HOLDC to map to the SyncPoint because it will naturally trigger a lock on the MCHR address record through the ordinary processing of the lock facility 108c. If the command analyzed in step 615 is a HOLDC, the logic modifies state tables 110a and 112 to indicate that a SyncPoint has been requested and then the logic proceeds to step 620, in which the flow of control is caused to return to the DASD engine 108 and eventually the lock facility 108c which will lock the record and thus prevent other entities from accessing the MCHR address corresponding to the queue. If the command analyzed in step 615 is not a HOLDC, the logic proceeds to step 625 in which the logic determines whether the channel program command is a FILEC, that is, a write command. If the command analyzed in step 625 is a FILEC, the logic proceeds to step 630 in which the data payload of the buffered channel command is Put to the corresponding named queue. If this is the first FILEC in the unit of work, as indicated by the table 110a having the "Syncpoint" indication set, the FILEC maps to a Put with a Syncpoint parameter set. After such action, the table 110a Syncpoint indication is cleared. If this FILEC is not the first in the transaction, as indicated by the table 110a having the "Syncpoint" indication cleared, the FILEC maps to a Put without setting the Syncpoint parameter. The logic then proceeds to step 635 in which the flow of control is caused to return to the DASD engine 108. In this manner, control is eventually returned to the mainframe, which may then send more Puts in this unit of work, or in which it may send the last Put of the unit of work. If the command in 625 is not a FILEC, the logic proceeds to step 640, which analyze the buffer channel program command. If the command analyzed in step 640 is a FILUC, the logic proceeds to step 645 in which the data payload of the buffered channel command is Put to the corresponding named queue and in which the unit of work is omitted, using the known API of the MQF. The logic then proceeds to step 660 in which the flow of control is caused to return to the DASD engine 108 and eventually the lock facility 108c which will unlock the record and thus allow other entities to access the MCHR address corresponding to the queue. The FILUC is used to complete the unit of work. The mainframe may send many FILECs preceding a FILUC, depending on the nature of the unit of work. If the command in step 640 is not a FILUC, the logic proceeds to step 650 in which the logic determines whether the channel program command is UNFRC, that is, an unlock command. If the command is an UNFRC, the logic proceeds to step 655, in which a Rollback command is issued to the MQF to abort the entire framed unit of work. If the mainframe application had started to perform Puts of a messages as a SyncPointed unit of work, but for some reason determined that it should not finish, the mainframe send the UNFRC to trigger a rollback using the known API of the MQF. The logic then proceeds to step 660 in which the flow of control is caused to return to the DASD engine 108 and eventually the lock facility 108c which will unlock the record and thus allow other entities to access the MCHR address corresponding to the queue. If the command analyzed in step 650 is not an UNFRC, the logic proceeds to step 665 in which the flow of control is caused to return to the DASD engine 108 and in which an error condition is signaled. In this scenario, a channel program command has been received which is not recognized. FIG. 7 shows the logic for multiple "Put" commands as a transactional "unit of work" in which an individual message in the unit of work may be larger than 4K bytes. The logic is invoked when one of the buffered channel program commands of table 3 is detected by mapping logic 112 in conjunction with an MCHR address associated with large Puts units of work. The logic, as will be explained below, supports Puts to a shared MQF queue. The "shareability" of the queue is a consequence of the functionality extended by the mapping logic 112. Mainframe software may segment a message that is greater than 4K Bytes into a chain of 4K record segments. Individual records in the TPF chain may then be filed at known file pool addresses resident on the DASD 109 of the modified DSTC 100 as explained above.
TABLE 5
______________________________________
Buffered Channel
Description MQSeries Verb Program Command
______________________________________
Sequence of Verbs to This logic assumes the
Lock and Put Long long message's chain of
Message to a Put Queue message segments has
as unit of work been filed using pool
MCHRs on DSTC 100
Open Queue MQOPEN Any Activity
Lock the Queue against N/A HOLDC
shared Update Activity
and indicate unit of
work - Indicate Sync-
point
Put the first segment of MQPUT (first with FILUC
the long message chain sync-point)
to (the head or prime of Put (subsequent
chain) to queue as the without synch-point)
first message in a unit of
work
Internally the mapping MQPUT without The subsequent
logic 112 Puts synch-point segments are found
subsequent message internally on the DSTC
segments of the long 100 and put in the long
message chain to queue message staging cache
as part of the unit of 112a
work (not the last
message however)
Put the last message MQPUT (the last
segment to queue message)
committing the unit of MQCMIT
work and unlocking the
queue to other shared
activity
Abort the unit of work UNFRC
and before the Put of
the Head of chain. This
unlocks the queue for
shared update activity
______________________________________
The logic begins in step 700 and proceeds to step 705. In step 705, the logic determines whether the named queue is open. If the named queue is not open, the logic proceeds to step 710 in which the named queue is opened with known API calls to the MQF 114. The mapping logic 112 cooperatively maintains both the address watching logic status table 110a and the queue watching logic status table 118a respectively with the address watching logic 110 and the queue watching logic 118 to modify the queue status. If the named queue is open, the logic proceeds to step 715. In step 715, the logic analyzes the buffered channel program command to determine whether it is HOLDC, that is, hold and lock the MCHR address. This command is used to indicate a SyncPointed unit of work from a specific mainframe is being initiated. Since the operation to the queue is a series of message puts that are to be seen as a single unit of work, the operations must be "framed" with a known MQF 114 SyncPoint and concluded with either a Commit or Rollback. The preferred embodiment uses the HOLDC command to map to the SyncPoint because it will naturally trigger a lock on the MCHR address record through the ordinary processing of the lock facility 108c. The ordinary locking protects this unit of work from other processors sharing the queue from inserting their messages into this unit of work. If step 715 determines the command is a HOLDC, the logic proceeds to step 720 in which the table 110a is updated to set the Syncpoint indication, as explained above, and in which the flow of control is returned to DASD engine 108 and in which the lock facility 108a will lock the MCHR address in the ordinary course of processing the HOLDC command. If the command analyzed in step 715 is not a HOLDC, the logic proceeds to step 725 in which the logic determines whether the channel program command is a FILEC or FILUC type command, that is, a write command or write and unhold/unlock. The FILEC command is used for Puts to a queue being used for unit of works, and it is used as the second command in a series of commands issued for Puts to the queue. The FILUC command is used for the Put to a queue of the last message in a unit of work and then commit the whole unit of work. It can either be the second command in a series of commands issued for a single Put to the queue or after the series of Puts (FILECs) for an multi-message unit of work. If the command analyzed in step 725 is a either the FILEC or FILUC processing proceeds with step 727. If the command is not a FILEC or a FILUC he logic proceeds to step 760. In step 727 the logic analyzes the data payload of the buffered channel command. Specifically, the logic analyzes the known forward and back chaining fields of the record in the data payload, and the current record is sequentially copied into the mapping logic's 112 internal long message staging cache 112a. If the mapping logic 112 determines that the known forward chain field in the TPF standard record header is set to binary zeroes, the current record is the end of chain. A nonzero forward chain field in the current record is the known MCHR pool address that points to the next record in chain. The mapping logic 112 uses the forward chain MCHR address to set up the DASD engine 108 to stage an internal FINWC command of the forward chained record. It then triggers the DASD engine 108 to fetch it. The forward chained record fetched by the DASD engine is copied by the mapping logic 112 as the next sequential record into the internal long message staging cache 112a. This scanning process of determining if there is a forward chain and then fetching it to the internal long message staging cache 112a continues until a forward chain field of binary zeroes is found indicating end of chain. Processing proceeds to step 730. In step 730, the logic analyzes the record chain by stepping sequentially through each record saved in the internal long message staging cache 112a. By using the MCHR addresses in both forward and backward chaining fields of each record, the chain of records can be traversed logically both forward and backwards. This action insures that the physical sequence of the chain as it lies in the internal long message staging cache 112a properly matches its logical sequence. In step 730, the logic reassembles the message segments residing in the chain of records back into one large message. Again by stepping sequentially through each record saved in the internal message staging cache 112a, each standard TPF record header is stripped off from each record and the remaining message segment is concatenated into the long message. The processing proceeds to step 735 in which the logic determines whether the reassembly was successful. If so, the logic proceeds to step 740; otherwise it is a bad chain and processing continues with step 790. In step 790, if the chain was bad the flow of control is caused to return to the DASD engine 108 and an error condition is signaled. In step 740, the logic Puts the fully reassembled long message that is in the internal long message staging cache 112a to the open queue in the MQF 114. If the syncpoint indication is set, the long message is put with sync-point including it as part of the unit of work. The logic then proceeds to step 745, where if the I/O file command analyzed in step 725 was a FILUC, processing continues with Step 750. If the command was not a FILUC processing proceeds to Step 755 in which the flow of control is caused to return to the DASD engine 108 signaling a good return to the mainframe. In step 750, the logic issues a Commit to complete the MQF 114 unit of work. Processing continues with step 770 in which the flow of control is caused to return to the DASD engine 100 and eventually the lock facility 108c which will unlock the record associated with the MCHR of the FILUC and thus allow other entities to access the MCHR address corresponding to the queue. If the command analyzed in step 725 is not a FILEC or FILUC, the logic proceeds to step 760, in which the buffered channel program command is analyzed. If the command analyzed in step 760 is an UNFRC the logic proceeds to step 765. In step 765, the logic issues a Rollback to the MQF 114 to abort the unit of work. Processing continues with step 770 in which the flow of control is caused to return to the DASD engine 108 and eventually the lock facility 108c which will unlock the record and thus allow other entities to access the MCHR address corresponding to the queue. If the command analyzed in step 760 is not an UNFRC the logic proceeds to step 790 in which the flow of control is caused to return to the DASD engine 108 and in which an error condition is signaled. In this scenario, a channel program command has been received which is not recognized. FIG. 8 shows the logic for a single "Get" command in which the individual message is less than 4K bytes each. This scenario permits the poll of a non-shared queue for a message. If there is a message on queue it will be returned, and if not a null record will be returned. The logic is invoked when one of the buffered channel program commands of table 6 is detected by mapping logic 112 in conjunction with an MCHR address associated with single Gets.
TABLE 6
______________________________________
Buffered Channel
Description MQSeries Verb Program Command
______________________________________
Sequence of Verbs to
lock and Get a single
message from queue
Open Queue MQOPEN any activity against
MCHR
Get a message from the MQGET FINWC
Queue.
______________________________________
The logic begins in step 800 and proceeds to step 805. In step 805, the logic determines whether the named queue is open. If the named queue is not open, the logic proceeds to step 810 in which the named queue is opened with known API calls to the MQF 114. The mapping logic 112 cooperatively maintains both the address watching logic status table 110a and the queue watching logic status table 118a respectively with the address watching logic 110 and the queue watching logic 118 to modify the queue state. If the named queue is open, the logic proceeds to step 830. In step 830, the logic analyzes the buffered channel program command to determine whether it is FINWC, that is, a blocked read. If the command analyzed in step 830 is not a FIWHC, the logic proceeds to step 835 in which the flow of control is caused to return to the DASD engine 108 and in which an error condition is signaled. In this scenario, a channel program command has been received which is not recognized. If the command in step 830 is a FINWC, the logic proceeds to step 840. In step 840, the logic issues a Get command to the named queue corresponding to the MCHR address. When MQF 114 returns from processing the Get the logic continues with step 880. In step 880, the logic determines whether it received a result from the MQF by using the return code from the MQF. If a message was received, the logic proceeds to step 885 in which flow of control is returned to engine 108 and in which processing logic 108b returns the record at the relevant MCHR to the mainframe. If a message was not received, the logic proceeds to step 890. More specifically, in step 885 the mapping logic 112 places the returned message payload into the DSTC's RAM cache buffer 120 entry that corresponds to the FINWC's MCHR address. Then flow of control is caused to return to the DASD engine and eventually the processing logic 108b which will cause the record to be transferred from the RAM cache buffer 120, across the channel interface 104 into the mainframe. If the Get to the MQF finds nothing in the named queue (e.g., empty queue), the logic proceeds to step 890 in which the mapping logic 112 places a null record indicating no message into the DSTC's RAM cache buffer 120 entry that corresponds to the FINWC's MCHR address. The logic proceeds to step 895 in which the flow of control is caused to return to the DASD engine 108 and eventually the processing logic 108b which will cause the null record to be transferred from the RAM cache buffer 120, across the channel interface 104 into the mainframe. Step 895 causes flow of control to return to the DASD engine and the null record is returned to the mainframe. FIG. 9 shows the logic for a single "Get" command in which the individual message is less than 4K bytes each. The logic is invoked when one of the buffered channel program commands of table 7 detected by mapping logic 112 in conjunction with an MCHR address associated with single Gets. The logic, as will be explained below, supports Gets to a shared MQF queue. The "shareability" of the queue is a consequence of the functionality extended by the mapping logic 112.
TABLE 7
______________________________________
Buffered Channel
Description MQSeries Verb Program Command
______________________________________
Sequence of Verbs to
lock the queue and Get a
single message from
queue
Open Queue MQOPEN any activity against
MCHR
Get a message from the MQGET FIWHC
Queue.
Unlock the Queue N/A UNFRC
______________________________________
The logic begins in step 900 and proceeds to step 905. In step 905, the logic determines whether the named queue is open. If the named queue is not open, the logic proceeds to step 910 in which the named queue is opened with known API calls to the MQF 114. The mapping logic 112 cooperatively maintains both the address watching logic status table 110a and the queue watching logic status table 118a respectively with the address watching logic 110 and the queue watching logic 118 to modify the queue status. Logic proceeds to step 930. In step 930, the logic analyzes the buffered channel program command to determine whether it is FIWHC, that is, a lock and blocked read. This command is used in instances where the named queue is shareable among multiple mainframes connected to the I/O device 100. Since the intended operation to the named queue is a Get with the intent of transferring the message from the queue to the mainframe as soon as a message appears on the queue, the lock facility 108c is used to protect sequentiality of access. This use of blocked reads prevents the mainframe from continually having to browse the queue for new messages. The preferred embodiment uses the FIWHC because it will naturally trigger a lock on the MCHR address record through the ordinary processing of the lock facility 108c. If the command analyzed in step 930 is not a FIWHC, the logic proceeds to step 935 in which the flow of control is caused to return to the DASD engine 108 and in which an error condition is signaled. In this scenario, a channel program command has been received which is not recognized. If the command in step 930 is a FIWHC, the logic proceeds to step 940. In step 940, the logic issues a Get command to the named queue corresponding to the MCHR address. When MQF 114 returns from processing the Get the logic continues with step 980. In step 980, the logic determines whether it received a result from the MQF by using the return code from the MQF. If a message was received, the logic proceeds to step 985 in which flow of control is returned to engine 108 and in which processing logic 108b returns the record at the relevant MCHR to the mainframe. If a message was not received, the logic proceeds to step 990. More specifically, in step 985 the mapping logic 112 places the returned message payload into the DSTC's RAM cache buffer 120 entry that corresponds to the FIWHC's MCHR address. Then flow of control is caused to return to the DASD engine 108 and eventually the processing logic 108b which will cause the record to be transferred from the RAM cache buffer 120, across the channel interface 104 into the mainframe. It is then up to the mainframe to execute an UNFRC command to release the lock on the MCHR. If the Get to the MQF finds nothing in the named queue (e.g., empty queue), the logic in step 990 sets up a "trigger activation" process with queue watching logic 118. The logic of step 990 takes advantage of the FIWHC's lock and read request. Specifically, the logic of step 995 directly calls the DASD engine's lock facility 108c to set conditions to indicate that "another" (phantom) mainframe in the cluster sharing the MCHR already has the record with lock. In this fashion, the results returned to the mainframe will cause the relevant mainframe software to enter a wait state for the record. Thus, the mainframe executing the FIWHC must wait for the "other" to unlock it. The "other" phantom mainframe in reality is the queue watching logic 118, as will be explained below. The logic then proceeds to step 995 in which control flow is returned to DASD engine 108. (Later when the "other", that is the queue watching logic 118, detects a newly-received message in the message queue, the queue watching logic 118 will cause the DASD engine 108 to routinely both unlock the record and attention interrupt the waiting mainframe; in turn the waiting mainframe will re-request the find on the record, and this time it will successfully find it. This process is detailed later in FIG. 19.) In step 995 the logic causes flow of control to return to the DASD engine 108 and eventually the lock facility 108c. The lock facility 108c will signal the requesting mainframe that another mainframe has a lock on the record and that lock facility 108c will signal all waiting mainframe's when the lock on the desired MCHR corresponding to the queue is released. This lock facility logic is conventional.) FIG. 10A-B shows the logic for a single "Get" command in which the individual message is greater than 4K bytes each. The logic is invoked when one of the buffered channel program commands of table 8 is detected by mapping logic 112 in conjunction with an MCHR address associated with single large Gets. The logic, as will be explained below, supports Gets to a shared MQF queue. The "shareability" of the queue is a consequence of the functionality extended by the mapping logic 112.
TABLE 8
______________________________________
Buffered Channel
Description MQSeries Verb Program Command
______________________________________
Sequence of Verbs to
lock the queue and Get a
single long message
from queue
Open Queue MQOPEN any activity against
MCHR
Get the first in chain of MQGET FIWHC
a segmented long
message from the
Queue.
Get subsequent records FINWC
in the chain of a
segmented long message
Unlock the Queue N/A UNFRC/FILUC
______________________________________
The logic begins in step 1000 and proceeds to step 1005. In step 1005, the logic determines whether the named queue is open. If the named queue is not open, the logic proceeds to step 1010 in which the named queue is opened with known API calls to the MQF 114. The mapping logic 112 cooperatively maintains both the address watching logic status table 110a and the queue watching logic status table 118a respectively with the address watching logic 110 and the queue watching logic 118 to modify the queue status. Logic proceeds to step 1015. In step 1015, the logic analyzes the buffered channel program command to determine whether it is FIWHC, that is, a lock and blocked read. If the command analyzed in step 1015 is not a FIWHC, the logic proceeds to step 1072. If the command in step 1015 is a FIWHC, the logic proceeds to step 1030. In step 1030, the logic issues a Get command to the named queue corresponding to the MCHR address. A Get call is made to the MQF 114 using the known API and causes the long message to be copied from the queue into the mapping logic's 112 internal long message staging cache 112a. When MQF 114 returns from processing the Get the logic continues with step 1035. In step 1035, the logic determines whether it received a result from the MQF 114 by using the return code from the MQF 114. If a long message was received, the logic proceeds to step 1040. If a message was not received, the logic proceeds to step 1055. In step 1040, the logic constructs a TPF record chain by segmenting the long message into 4K TPF records in the internal long message staging cache 112a. Each message segment in the record chain is given a standard TPF record header. By placing a sequence number in both the forward and backward chaining fields of each record, the chain of records can be traversed logically both forward and backwards. This action insures that the physical sequence of the segmented chain as it physically lies in the internal long message staging cache 112a properly matches its logical sequence. The last record in the chain's forward chaining field is set to null indicating end of chain. In step 1045 the mapping logic 112 places the first TPF record in the chain that corresponds to the segmented long message into the DASD engine's RAM cache buffer 120 entry that corresponds to the FIWHC's MCHR address. The address watching logic status table 110a is updated with a long message cursor indicating the first record of the chain is ready for staging into the DASD engine's RAM cache buffer 120. Processing continues with step 1078. In step 1035, if the Get to the MQF finds nothing in the named queue (e.g., empty queue), the logic proceeds to step 1055 in which the logic sets up a trigger activation process with queue watching logic 118 similarly to that described above. (As before when the "other", that is the queue watching logic 118 is triggered active by a newly received message in the message queue, the queue watching logic 118 will cause the DASD engine 108 to routinely both unlock the record and attention interrupt the waiting mainframe; in turn the waiting mainframe will re-request the find on the record, and this time it will successfully find it. This process is detailed later in FIG. 19.) The logic proceeds to step 1059 in which the logic causes flow of control to return to the DASD engine 108 and eventually the lock facility 108c. The lock facility 108c will signal the requesting mainframe that another mainframe has a lock on the record and that lock facility 108c will signal all waiting mainframe's when the lock on the desired MCHR corresponding to the queue is released. This lock facility logic is conventional.) If in step 1015, the logic determined that the command is not a FIWHC, the logic proceeds to step 1072. In step 1072, the logic analyzes the buffered channel program command to determine whether it is FINWC, that is, blocked read. If it is, processing continues with step 1074. The FINWCs are used to read all subsequent 4K segment of the long Get. If the command analyzed in step 1072 is not a FINWC, the logic proceeds to step 1092 in which the flow of control is caused to return to the DASD engine 108 and in which an error condition is signaled. In this scenario, a channel program command has been received which is not recognized. In step 1074, the logic checks the address watching logic status table 110a's long message cursor to determine if all of the long message's chained records segments have been transferred to the mainframe. If they have not, then processing continues with step 1078. If the entire long message has been transferred to the mainframe processing continues with step 1076. In step 1076 the logic places a null record (indicating that all of the long message segments have been transferred to the mainframe) into the DASD engine's RAM cache buffer 120 entry that corresponds to the FINWC's MCHR address. Processing continues with step 1090. In step 1078, the mapping logic 112 places the next TPF record in the chain indicated by the long message cursor into the DASD engine's RAM cache buffer 120 entry that corresponds to the FIWHC's MCHR address. In step 1080 the logic checks the standard TPF forward chain field of the record just transferred to the DASD engine's RAM cache buffer 120 to determine if this is the last record in the chain. If it is the not the last record in chain processing proceeds to step 1085. If it is the last record in chain processing proceeds to step 1090. In step 1090, the logic flushes the long message staging cache 112a for this entry and clears the address watching logic status table 110a's long message cursor. Processing proceeds to step 1095. In step 1085, the logic updates the address watching logic status table 110a's long message cursor to point to the next record in the chain. Processing continues with step 1095. In step 1095, the logic causes the flow of control to return to the DASD engine and eventually the processing logic 108b which will cause the record to be transferred from the RAM cache buffer 120, across the channel interface 104 into the mainframe. When the last record of the chain is transferred to the mainframe it is then up to the mainframe application to execute an UNFRC command to release the lock on the MCHR. FIGS. 11A-B show the logic for multiple "Get" commands in which the individual messages make up a transactional unit of work. The messages are less than 4K bytes each. The logic is invoked when one of the buffered channel commands of table 9 is detected in conjunction with an MCHR address associated with multiple Gets. The logic, as will be explained below, supports Gets to a shared MQF queue. The "shareability" of the queue is a consequence of the functionality extended by the mapping logic 112.
TABLE 9
______________________________________
Buffered Channel
Description MQSeries Verb Program Command
______________________________________
Sequence of Verbs to This logic assumes the
Lock and Get messages inbound messages will
from a queue as unit of fit into a TPF 4K block
work that are less than size or less
4K
Open Queue MQOPEN Any Activity
Lock the Queue against MQGET (first with HOLDC
shared Update Activity sync-point)
and indicate a Get unit
of work - Indicate Sync-
point.
Get subsequent MQGET FINDC
messages in the unit of
work.
TPF application requests MQCMIT UNFRC
the commit of the read
unit of work and the
unlocking of the queue
to other shared queue
activity
Abort the read unit of MQBACK FILUC
work and leave it in the
queue. Also unlocks the
queue for shared activity
______________________________________
The logic begins in step 1100 and proceeds to step 1105. In step 1105, the logic determines whether the named queue is open. If the named queue is not open, the logic proceeds to step 1110 in which the named queue is opened with known API calls to the MQF 114. The mapping logic 112 cooperatively maintains both the address watching logic status table 110a and the queue watching logic status table 118a respectively with the address watching logic 110 and the queue watching logic 118 to modify the queue status. Processing continues with step 1125. In step 1125, the logic analyzes the buffered channel program command to determine whether it is HOLDC, that is, a lock. If the command is a HOLDC, the processing continues with step 1130 in which flow of control is returned to the engine 108 and lock facility 108c, which will lock the MCHR. The table 110a is updated to set the syncpoint indication. If the command analyzed in step 1125 is not a HOLDC, the logic proceeds to step 1135. In step 1135, the logic analyzes the buffered channel program command to determine whether it is FINWC, that is, a blocked read. If it is, the logic continues with step 1137; otherwise processing continues with step 1180. In step 1137, the logic issues a Get command with sync-point, indicating a unit of work, to the named queue corresponding to the MCHR if the syncpoint indication is set in table 110a. When the MQF 114 returns a result, processing continues with step 1155. In step 1155, the logic uses the return code from the MQF 114 to determine if the MQF 114 returned a message. If it didn't find a message, the logic proceeds to step 1160. If logic received a message, the logic continues with step 1159. In step 1159, the logic places the returned message payload into the DSTC's RAM cache buffer 120 entry that corresponds to the FINWC's MCHR address. The logic also updates the address watching logic table 110a entry for this MCHR to indicate data transfer for this Get unit of work has begun and to clear the syncpoint. The logic proceeds to step 1169 in which flow of control is caused to return to the DASD engine 108 and eventually the processing logic 108c which will cause the record to be transferred from the RAM cache buffer 120, across the channel interface 104 into the mainframe. In step 1160, the logic checks the address watching logic table 110a entry for this MCHR to see if data transfer from queue to mainframe for this Get unit of work has actually begun. If it has not begun, then processing must set up a wait for an incoming unit of work to be received in the queue. This trigger wait processing setup occurs in step 1170. If in step 1160, data transfer of the unit of work has begun from queue to mainframe, then the absence of any message on the MQF's 114 receive queue indicates the entire unit of work has been transferred to the mainframe. Processing continues with step 1165. In step 1170, the mapping logic 112 sets up a trigger activation process with queue watching logic 118 similarly to that described above in FIGS. 9 and 10. The logic then proceeds to step 1175. In step 1175, the logic returns flow of control lock facility to the DASD engine 108 and eventually the lock facility 108c. The lock facility will signal the requesting mainframe that another mainframe has a lock on the record and that lock facility 108c will signal all waiting mainframe's when the lock on the desired MCHR corresponding to the queue is released. In step 1165, the logic places a null record (indicating the end of unit of work has been reached) into the DSTC's RAM cache buffer 120 entry that corresponds to the FINWC's MCHR address. The logic proceeds to step 1169, in which the flow of control is caused to return to the DASD engine 108 and eventually the processing logic 108b which will cause the null record to be transferred from the RAM cache buffer 120, across the channel interface 104 into the mainframe. In step 1180, the logic determines if the buffered command is an UNFRC. If it is an UNFRC, processing continues with Step 1185. If the command is not an UNFRC, processing continues with step 1190 to determine if the command a FILUC. If it is a FILUC, processing continues with step 1192. Otherwise, the command is not recognized and the logic proceeds to step 1199 in which the flow of control is caused to return to the DASD engine 108 and in which an error condition is signaled. In this scenario, a channel program command has been received which is not recognized. In step 1185 the logic issues a Commit to the MQF 114 the unit of work since it has been successfully and completely transferred from queue to mainframe. Processing continues with step 1195 in which the flow of control is caused to return to the DASD engine 108 and eventually the lock facility 108c which will unlock the record associated with the MCHR of the UNFRC and thus allow other entities to access the MCHR address corresponding to the queue. If the command analyzed in step 1190 is a FILUC the logic proceeds to step 1192. In step 1192, the logic issues a Rollback to the MQF 114 to abort the unit of work. Processing continues with step 1195 in which the flow of control is caused to return to the DASD engine 108 and eventually the lock facility 108c which will unlock the record and thus allow other entities to access the MCHR address corresponding to the queue. FIGS. 12A-B shows the logic for multiple "Get" commands in which the individual messages make up a transactional unit of work. Any given message in the unit of work may be greater 4K bytes each. The logic is invoked when one of the buffered channel commands of table 10 is detected in conjunction with an MCHR address associated with multiple Gets. The logic, as will be explained below, supports Gets to a shared MQF queue. The "shareability" of the queue is a consequence of the functionality extended by the mapping logic 112.
TABLE 10
______________________________________
Buffered Channel
Description MQSeries Verb Program Command
______________________________________
Sequence of Verbs to This logic assumes the
Lock and Get messages inbound messages may
from a queue as unit of be greater than a TPF
work that may be greater 4K block size
than 4K
Open Queue MQOPEN Any Activity
Lock the Queue against MQGET (first with HOLDC
shared Update Activity sync-point)
and indicate a Get unit
of work - Indicate Sync-
point.
Get subsequent MQGET FINWC
messages in the unit of
work.
TPF application requests MQCMIT UNFRC
the commit of the read
unit of work and the
unlocking of the queue
to other shared queue
activity
Abort the read unit of MQBACK FILUC
work and leave it in the
queue. Also unlocks the
queue for shared activity
______________________________________
The logic begins in step 1200 and proceeds to step 1205. In step 1205, the logic determines whether the named queue is open. If the named queue is not open, the logic proceeds to step 1210 in which the name queue is opened with known API calls to the MQF 114. The mapping logic 112 cooperatively maintains both the address watching logic status table 110a and the queue watching logic status table 118a respectively with the address watching logic 110 and the queue watching logic 118 to modify the queue status. Processing continues with step 1225. In step 1225, the logic analyzes the buffered channel program command to determine whether it is HOLDC, that is, a lock. If the command is a HOLDC, the processing continues with step 1230 in which flow of control is returned to the engine 108 and lock facility 108c, which will lock the MCHR. The table 110a is updated to set the syncpoint indication. If the command analyzed in step 1225 is not a HOLDC, the logic proceeds to step 1235. In step 1235, the logic analyzes the buffered channel program command to determine whether it is FINWC, that is, a blocked read. If it is, the logic continues with step 1237; otherwise processing continues with step 1280. Steps 1237 and 1240 are processing pass connectors to step 1242. Step 1242 checks the address watching logic table 110a to determine if any messages have been transferred for this unit of work. If a unit of work is being transferred then processing proceeds to step 1250. Otherwise in step 1244, the logic issues a Get command with sync-point to get the first long message in a unit of work from the named queue corresponding to the MCHR address. The Get call is made to the MQF 114 using the known API causes the long message to be copied from the queue into the mapping logic's 112 internal long message staging cache 112a. When MQF 114 returns from processing the Get the logic continues with step 1260. In step 1260, the logic determines whether it received a result from the MQF 114 by using the return code from the MQF 114. If a long message was received, the logic proceeds to step 1265. If a message was not received, the logic proceeds to step 1261. In step 1265, the logic constructs a TPF record chain by segmenting the first long message into 4K TPF records in the internal long message staging cache 112a. Each message segment in the record chain is given a standard TPF record header. By placing a sequence number in both the forward and backward chaining fields of each record, the chain of records can be traversed logically both forward and backwards. This action insures that the physical sequence of the segmented chain as it physically lies in the internal long message staging cache 112a properly matches its logical sequence. The last record in the chain's forward chaining field is set to null indicating end of chain. In step 1267 the mapping logic 112 places the first TPF record in the chain that corresponds to the segmented long message into the DSTC engine's (108) RAM cache buffer 120 entry that corresponds to the FIWHC's MCHR address. The address watching logic status table 110a is updated with a long message cursor indicating the first record of the chain is ready for transfer from the DSTC engine's RAM cache buffer 120 into the mainframe. Processing continues with step 1279. In step 1261, the mapping logic 112 sets up a trigger activation process with queue watching logic 118 similarly to that described above in FIGS. 9 and 10 to wait for a unit of work to be received in the queue. The logic then proceeds to step 1262. In step 1262, the logic returns flow of control lock facility to the DSTC engine 108 and eventually the lock facility 108c. The lock facility will signal the requesting mainframe that another mainframe has a lock on the record and that lock facility 108c will signal all waiting mainframe's when the lock on the desired MCHR corresponding to the queue is released. In step 1250 (from step 1242), the logic checks the address watching logic status table 110a's long message cursor to determine if all of the long message's chained records segments have been transferred to the mainframe. If they have not, then processing continues with step 1251. If the entire long message has been transferred to the mainframe processing continues with step 1252. In step 1251, the mapping logic 112 places the next TPF record in the chain indicated by the long message cursor into the DSTC engine's RAM cache buffer 120 entry that corresponds to the FIWHC's MCHR address. Processing continues with step 1279 after incrementing the long message cursor. In step 1279 the flow of control is caused to return to the DSTC engine 108 and eventually to the processing logic 108c which will cause the record to be transferred from the RAM cache buffer 120, across the channel interface 104 into the mainframe. In step 1252, the logic issues another Get command to get the next message in the sync-pointed unit of work from the named queue corresponding to the MCHR address. A Get call is made to the MQF 114 using the known API causes the long message to be copied from the queue into the mapping logic's 112 internal long message staging cache 112a. When MQF 114 returns from processing the Get the logic continues with step 1254. In step 1254, the logic determines whether it received a result from the MQF 114 by using the return code from the MQF 114. If a long message was received, the logic proceeds to step 1256. If a message was not received, the logic proceeds to step 1258. In step 1256, the logic again constructs a TPF record chain by segmenting the long message into 4K TPF records in the internal long message staging cache 112a. Each message segment in the record chain is given a standard TPF record header. By placing a sequence number in both the forward and backward chaining fields of each record, the chain of records can be traversed logically both forward and backwards. This action insures that the physical sequence of the segmented chain as it physically lies in the internal long message staging cache 112a properly matches its logical sequence. The last record in the chain's forward chaining field is set to null indicating end of chain. In step 1257, the logic prepares a X'FF'ed record indicating that both the end of a long message has been reached, but not the end of unit of work. The address watching logic status table 110a's long message cursor is cleared for the next long message. The X'FF'ed record is placed into the DSTC's RAM cache buffer 120 entry that corresponds to the FINWC's MCHR address. The logic proceeds to step 1279, in which the flow of control is caused to return to the DSTC engine 108 and eventually the processing logic 108b which will cause the X'FF'ed record to be transferred from the RAM cache buffer 120, across the channel interface 104 into the mainframe. In step 1258, the logic prepares a null record indicating both the end of a long message and the end of unit of work has been reached. This null record is placed into the DSTC's RAM cache buffer 120 entry that corresponds to the FINWC's MCHR address. In step 1259 the internal long message staging cache 112a entry for this long message is cleared as well as the address watching logic status table 110a's long message cursor is cleared. The logic proceeds to step 1279, in which the flow of control is caused to return to the DSTC engine 108 and eventually the processing logic 108b which will cause the null record to be transferred from the RAM cache buffer 120, across the channel interface 104 into the mainframe. In step 1280, the logic determines if the buffered command is an UNFRC. If it is an UNFRC, processing continues with Step 1285. If the command is not an UNFRC, processing continues with step 1290 to determine if the command a FILUC. If it is a FILUC, processing continues with step 1292. Otherwise, the command is not recognized and the logic proceeds to step 1299 in which the flow of control is caused to return to the DSTC engine 108 and in which an error condition is signaled. In this scenario, a channel program command has been received which is not recognized. In step 1285 the logic issues a Comment to the MQF 114 the unit of work since it has been successfully and completely transferred from queue to mainframe. Processing continues with step 1295 in which the flow of control is caused to return to the DSTC engine 108 and eventually the lock facility 108c which will unlock the record associated with the MCHR of the UNFRC and thus allow other entities to access the MCHR address corresponding to the queue. If the command analyzed in step 1290 is a FILUC the logic proceeds to step 1292. In step 1292, the logic issues a Rollback to the MQF 114 to abort the unit of work. Processing continues with step 1295 in which the flow of control is caused to return to the DSTC engine 108 and eventually the lock facility 108c which will unlock the record and thus allow other entities to access the MCHR address corresponding to the queue. FIG. 13 shows the logic for a "Browse First" command in which the individual message is less than 4K bytes each. The logic is invoked when one of the buffered channel program commands of table 11 is detected by mapping logic 112 in conjunction with an MCHR address associated with Browse First.
TABLE 11
______________________________________
Buffered Channel
Description MQSeries Verb Program Command
______________________________________
Sequence of Verbs to
Browse a queue for the
first message in the
queue
Open Queue MQOPEN any activity against
MCHR
Browse the first message MQGET FINWC
in the queue.
______________________________________
The logic begins in step 1300 and proceeds to step 1305. In step 1305, the logic determines whether the named queue is open. If the named queue is not open, the logic proceeds to step 1310 in which the named queue is opened with known API calls to the MQF 114. The mapping logic 112 cooperatively maintains both the address watching logic status table 110a and the queue watching logic status table 118a respectively with the address watching logic 110 and the queue watching logic 118 to modify the queue status. If the named queue is open, the logic proceeds to step 1330. In step 1330, the logic analyzes the buffered channel program command to determine whether it is FINWC, that is, a read of a given MCHR. This command is used to map to Browse First verbs. A Browse to an MQF 114 named queue is a nondestructive access or read in which the message is read but the message remains in the queue. If a FINWC is detected, the logic proceeds to step 1340. If the command analyzed in step 1330 is not a FINWC, the logic proceeds to step 1335 in which the flow of control is caused to return to the DASD engine 108 and in which an error condition is signaled. In this scenario, a channel program command has been received which is not recognized. In step 1340, the logic issues a Get with Browse.sub.-- First option to the MQF 114. The mapping logic 112 places the returned message payload into the DSTC's RAM cache buffer 120 entry that corresponds to the FINWC's MCHR address. The logic then proceeds to step 1380. In step 1380 when the mapping logic 112 detects a return code from the MQF that a message was returned, processing proceeds to step 1385. In step 1385 the logic causes the flow of control to return to the DASD engine 108 and eventually the channel program processing logic 108a which will cause the browse record to be transferred from the RAM cache buffer 120, across the channel interface 104 into the mainframe. If there is no message in step 1380, the logic proceeds to step 1390 in which a null record in the cache buffer 120. The logic proceeds to step 1395 in which the null record is returned to the mainframe. FIG. 14 shows the logic for a "Browse Next" command in which the individual message is less than 4K bytes each. The logic is invoked when one of the buffered channel program commands of table 12 detected by mapping logic 110 in conjunction with an MCHR address associated with Browse Next.
TABLE 12
______________________________________
Buffered Channel
Description MQSeries Verb Program Command
______________________________________
Sequence of Verbs to
Browse the next message
in the queue
Open Queue MQOPEN any activity against
MCHR
Force Browse Next to N/A FILEC
beginning of Queue
Browse the next message MQGET FINWC
in the queue.
______________________________________
The logic begins in step 1400 and proceeds to step 1405. In step 1405, the logic determines whether the named queue is open. If the named queue is not open, the logic proceeds to step 1410 in which the named queue is opened with known API calls to the MQF 114 The mapping logic 112 cooperatively maintains both the address watching logic status table 110a and the queue watching logic status table 118a respectively with the address watching logic 110 and the queue watching logic 118 to modify the queue status. If the named queue is open, the logic proceeds to step 1430. In step 1430, the logic analyzes the buffered channel program command to determine whether it is FINWC, that is, a blocked read of a given MCHR or a FILEC, that is, a simple file write without lock. These commands are used respectively to map to the Browse Next verb and force the Browse Next to the beginning of the queue. A Browse to an MQF 114 named queue is a nondestructive access or read in which the message is read but the message remains in the queue. If a FINWC or FILEC are detected, the logic proceeds to step 1440. If the command analyzed in step 1430 is not a FINWC or FILEC, the logic proceeds to step 1435 in which the flow of control is caused to return to the DASD engine 108 and in which an error condition is signaled. In this scenario, a channel program command has been received which is not recognized. In step 1430, if the command is a FILEC, the logic proceeds to step 1445, in which the logic sets the Browse Next indicator in the address watching logic status table 110, for this MCHR entry to force the Browse.sub.-- Next to the beginning of the queue. The logic proceeds to step 1449 in which the flow of control is caused to return to the DASD engine 108 and in which a good return condition is signaled. If the command wasn't a FILEC it is a FINWC, which is processed in 1450. In step 1450, the logic issues a Get with Browse.sub.-- Next option to the MQF 114. If the force to beginning of queue indicator is set in the address watching logic status table 110a entry for this MCHR, the Get with Browse.sub.-- Next is forced to the beginning of the queue. The mapping logic 112 places the returned message payload into the DSTC's 102 RAM cache buffer 120 entry that corresponds to the FINWC's MCHR address. The logic then proceeds to step 1460. In step 1460, when the logic detects a return code from the MQF that a message was returned processing proceeds to step 1465. In step 1465, the logic causes the flow of control to return to the DASD engine 108 and eventually the channel program processing logic 108a which will cause the browse record to be transferred from the RAM cache buffer 120, across the channel interface 104 into the mainframe. If there is no message returned, the logic proceeds to step 1470. In step 1470 if the return code indicated that the queue was empty, step 1475 causes the logic to place a null record (indicating an empty queue) into the DSTC's RAM cache buffer 120 entry that corresponds to the FINWC's MCHR address. In step 1485, the logic causes flow of control to return to the DASD engine 108 and eventually the processing logic 108b which will cause the null record to be transferred from the RAM cache buffer 120, across the channel interface 104 into the mainframe. In step 1470 if the return code indicated that all records currently in the queue have been browsed, step 1480 causes the logic to place a record filled with X'FF's (indicating end of queue) into the DSTC's RAM cache buffer 120 entry that corresponds to the FINWC's MCHR address. In step 1485 flow of control is caused to return to the DASD engine and eventually the processing logic 108b which will cause the X'FF' null record to be transferred from the RAM cache buffer 120, across the channel interface 104 into the mainframe. FIG. 15 shows the logic for a "Browse.sub.-- with.sub.-- Cursor" command in which the individual message is less than 4K bytes each. The logic is invoked when one of the buffered channel program commands of table 13 detected by mapping logic 110 in conjunction with an MCHR address associated with Browse.sub.-- with.sub.-- Cursor.
TABLE 13
______________________________________
Buffered Channel
Description MQSeries Verb Program Command
______________________________________
Sequence of Verbs to
Browse.sub.-- with.sub.-- Cursor
message in the queue
Open Queue MQOPEN any activity against
MCHR
Lock the Queue from N/A FIWHC
sharing
Force N/A FILEC
Browse.sub.-- with.sub.-- Cursor to
beginning of Queue
Browse.sub.-- with.sub.-- Cursor MQGET FINWC
message in the queue.
Unlock the queue N/A UNFRC
______________________________________
The logic begins in step 1500 and proceeds to step 1510. In step 1510, the logic determines whether the named queue is open. If the named queue is not open, the logic proceeds to step 1515 in which the named queue is opened with known API calls to the MQF 114 The mapping logic 112 cooperatively maintains both the address watching logic status table 110a and the queue watching logic status table 118a respectively with the address watching logic 110 and the queue watching logic 118 to modify the queue status. If the named queue is open, the logic proceeds to step 1520. In step 1520, the logic analyzes the buffered channel program command to determine whether it is FIWHC, that is, a blocked read and lock. If the command analyzed in step 1540 is a FIWHC command, the logic proceeds to step 1525, in which the flow of control is caused to return to the DASD engine 108 and eventually the lock facility 108c which will lock the record and thus prevent other entities from accessing the MCHR address corresponding to the queue. If the command is not a FIWHC, the logic proceeds to step 1530. In step 1530, if the command analyzed in step 1530 is a FILEC, the logic proceeds to step 1535 in which the data payload is the numeric cursor for a Browse.sub.-- with.sub.-- Cursor call to the MQF 114. The numeric cursor is transferred to the address watching logic status table 110a entry's cursor field for this MCHR. The logic proceeds to step 1539 in which the flow of control is caused to return to the DASD engine 108 and in which a good return condition is signaled. If the command wasn't a FILEC processing proceeds to step 1540. In step 1540 if the command analyzed is a FINWC, that is, a blocked read, the command is mapped to a Browse.sub.-- with.sub.-- Cursor to the queue that corresponds to this MCHR in step 1550. The Browse.sub.-- with.sub.-- Cursor call is made to the MQF 114 named queue using the numeric cursor saved in the address watching logic status table 110a for this MCHR. The browse with cursor is a nondestructive access or read to a specific message that is read but the message remains in the queue. The logic places the returned message payload into the DSTC's RAM cache buffer 120 entry that corresponds to the FINWC's MCHR address. The logic then proceeds to step 1560. If the command analyzed in step 1540 is not a FINWC, the logic proceeds to step 1545. In step 1545 if the command analyzed is not an UNFRC, the logic proceeds to step 1549 in which the flow of control is caused to return to the DASD engine 108 and in which an error condition is signaled. In this scenario, a channel program command has been received which is not recognized. If the command analyzed in step 1545 is an UNFRC, the logic proceeds to step 1555 in which the flow of control is caused to return to the DASD engine 108 and eventually the lock facility 108c which will unlock the record and thus allow other entities to access the MCHR address corresponding to the queue. In step 1560, when the mapping logic 112 detects a return code from the MQF 114 that a message was returned, processing proceeds to step 1565. In step 1565 the logic causes the flow of control to return to the DASD engine 108 and eventually the channel program processing logic 108a which will cause the browse record to be transferred from the RAM cache buffer 120, across the channel interface 104 into the mainframe. In step 1560, if the return code indicated that the queue was empty, the logic proceed to step 1570 in which the logic causes a null record (indicating an empty queue) to be placed into the DSTC's RAM cache buffer 120 entry that corresponds to the FINWC's MCHR address. In step 1575 flow of control is caused to return to the DASD engine and eventually the processing logic 108b which will cause the null record to be transferred from the RAM cache buffer 120, across the channel interface 104 into the mainframe. FIG. 16 shows the logic for a "Get.sub.-- with.sub.-- Cursor" command in which the individual message is less than 4K bytes each. The logic is invoked when one of the buffered channel program commands of table 14 detected by mapping logic 110 in conjunction with an MCHR address associated with Get.sub.-- with.sub.-- Cursor. The logic, as will be explained below, supports Gets to a shared MQF queue. The "shareability" of the queue is a consequence of the functionality extended by the mapping logic 112.
TABLE 14
______________________________________
Buffered Channel
Description MQSeries Verb Program Command
______________________________________
Sequence of Verbs to
Get.sub.-- with.sub.-- Cursor
message in the queue
Open Queue MQOPEN any activity against
MCHR
Lock the Queue from N/A FIWHC
sharing
Force Get.sub.-- with.sub.-- Cursor N/A FILEC
to beginning of Queue
Get.sub.-- with.sub.-- Cursor MQGET FINWC
message in the queue.
Unlock the queue N/A UNFRC
______________________________________
The logic begins in step 1600 and proceeds to step 1610. In step 1610, the logic determines whether the named queue is open. If the named queue is not open, the logic proceeds to step 1615 in which the named queue is opened with known API calls to the MQF 114 The mapping logic 112 cooperatively maintains both the address watching logic status table 110a and the queue watching logic status table 118a respectively with the address watching logic 110 and the queue watching logic 118 to modify the queue status. If the named queue is open, the logic proceeds to step 1620. In step 1620, the logic analyzes the buffered channel program command to determine whether it is FIWHC, that is, a blocked read and lock. This command is used in instances where the queue is shareable among multiple mainframes connected to the I/O device. The preferred embodiment uses the FIWHC because it will naturally trigger a lock on the MCHR address record through the ordinary processing of the lock facility 108c. The lock precludes other mainframes from accessing the corresponding MCHR record until the lock is released (Unhold). If the command analyzed in step 1620 is a FIWHC command, the logic proceeds to step 1625, in which the flow of control is caused to return to the DASD engine 108 and eventually the lock facility 108c which will lock the record and thus prevent other entities from accessing the MCHR address corresponding to the queue. If the command in step 1620 is not a FIWHC, the logic proceeds to step 1630. In step 1630, if the command analyzed in step 1630 is a FILEC, the logic proceeds to step 1615 in which the data payload is the numeric cursor for a Get.sub.-- with.sub.-- Cursor call to the MQF 114. The numeric cursor is transferred to the address watching logic status table 110a entry's cursor field for this MCHR. The logic proceeds to step 1639 in which the flow of control is caused to return to the DASD engine 108 and in which a good return condition is signaled. If the command wasn't a FILEC processing proceeds to step 1640. In step 1640, if the command analyzed is a FINWC, that is, a blocked read, the command is mapped to a Get.sub.-- with.sub.-- Cursor to the queue that corresponds to this MCHR in step 1650. The Get.sub.-- with.sub.-- Cursor call is made to the MQF 114 named queue using the numeric cursor saved in the address watching logic status table 110a for this MCHR. The Get with cursor Gets a specific message that from the queue. The logic places the returned message payload into the DSTC's RAM cache buffer 120 entry that corresponds to the FINWC's MCHR address. The logic then proceeds to step 1660. If the command is not a FINWC, the logic proceeds to step 1645. In step 1645 if the command analyzed is not an UNFRC, the logic proceeds to step 1649 in which the flow of control is caused to return to the DASD engine 108 and in which an error condition is signaled. In this scenario, a channel program command has been received which is not recognized. If the command analyzed in step 1645 is an UNFRC, the logic proceeds to step 1655 in which the flow of control is caused to return to the DASD engine 108 and eventually the lock facility 108c which will unlock the record and thus allow other entities to access the MCHR address corresponding to the queue. In step 1660, when the mapping logic 112 detects a return code from the MQF 114 that a message was returned, processing proceeds to step 1665. In step 1665 the flow of control is caused to return to the DASD engine and eventually the channel program processing logic 108a which will cause the Get record to be transferred from the RAM cache buffer 120, across the channel interface 104 into the mainframe. In step 1660 if the return code indicated that the queue was empty, the logic proceeds to step 1670 and places a null record (indicating an empty queue) into the DSTC's RAM cache buffer 120 entry that corresponds to the FINWC's MCHR address in step 1670. In step 1675 flow of control is caused to return to the DASD engine and eventually the processing logic 108b which will cause the null record to be transferred from the RAM cache buffer 120, across the channel interface 104 into the mainframe. FIG. 17 shows the logic for a "Get with options and description" command in which the individual message is less than 4K bytes each. The logic is invoked when one of the buffered channel program commands of table 15 detected by mapping logic 110 in conjunction with an MCHR address associated with Get with options and description. The logic, as will be explained below, supports Gets to a shared MQF queue. The "shareability" of the queue is a consequence of the functionality extended by the mapping logic 112.
TABLE 15
______________________________________
Buffered Channel
Description MQSeries Verb Program Command
______________________________________
Sequence of Verbs to
Get wi | ||||||
