Recoverability

Method and apparatus for processing a list structure

6963882

Abstract

Various enhancements are made to the architecture of a list processor to facilitate its use in implementing a message queue that is shared by queue managers residing across a multisystem complex. A new list structure control—a program list entry identifier indicator, or PLEIDI—is defined to allow the user to specify whether user-defined entry IDs are used when the list is allocated. A new delete list (DL) command is added that sequentially processes list entries in the order in which they exist on the specified list. A new move list entries (MLES) command provides a performance-optimized means to process an input list of entries. New key comparison functions and list monitoring enhancements have also been added. A new type of key called a secondary list entry key (SLEK) allows the user to specify a secondary key value as a means to identify a list entry.


Claims

1. In an information handling system in which operations are performed on a list structure by a list structure processor in response to requests received from a requester, a method of processing a list structure, comprising the steps of:

defining as a part of said list structure a list comprising a sequence of list entries, each of said list entries being uniquely identified by an associated list entry identifier;

defining a list entry identifier indicator for said list, said list entry identifier indicator indicating whether said list entry identifiers are generated by said list structure processor or supplied by said requester;

creating list entries having said list entry identifiers generated by said list structure processor if said list entry identifier indicator indicates that said list entry identifiers are generated by said list structure processor; and

creating list entries having said list entry identifiers supplied by said requester if said list entry identifier indicator indicates that said list entry identifiers are supplied by said requester.

2. In an information handling system in which operations are performed on a list structure by a list structure processor in response to requests received from a requester, a method of processing a list structure, comprising the steps of:

defining as a part of said list structure a list comprising a sequence of list entries, each of said list entries having an associated list entry key;

specifying for each of one or more source list entries in said list a target list entry key and a target list;

changing the list entry key of each of said source list entries to the target list entry key specified for the source list entry; and

moving each of said source list entries to the target list specified for the source list entry.

3. In an information handling system in which operations are performed on a list structure by a list structure processor in response to requests received from a requester, a method of processing a list structure, comprising the steps of:

defining as a part of said list structure a list comprising a sequence of list entries, each of said list entries having an associated list entry key;

defining one or more comparison list entry keys;

receiving a user input defining a type of comparison operation between a list entry key associated with one of said list entries and said one or more comparison list entry keys; and

performing a comparison operation of the defined type on said associated list entry key and said one or more comparison list entry keys.

4. The method of claim 3 in which said type of comparison operation is defined as being equal, less than or equal, or greater than or equal to a single specified key value.

5. The method of claim 3 in which a pair of comparison list entry keys are defined specifying a key range and in which said type of comparison operation is a key range comparison to a pair of specified key values.

6. The method of claim 3 in which said comparison operation is performed for a single list entry in said list.

7. The method of claim 3 in which said comparison operation is performed for multiple list entries in said list.

8. The method of claim 3, comprising the further step of:

performing a further operation on said list entry in accordance with the results of said comparison operation.

9. The method of claim 8 in which said further operation is a delete operation.

10. The method of claim 8 in which said further operation is a move operation.

11. The method of claim 8 in which said further operation is a read operation.

12. The method of claim 8 in which said further operation is a write operation.

13. In an information handling system in which operations are performed on a list structure by a list structure processor in response to requests received from a requester, a method of processing a list structure, comprising the steps of:

defining as a part of said list structure a list comprising a sequence of list entries, each of said list entries having an associated list entry key;

defining a subset of said list having list entry keys falling within a predetermined range of values extending between a minimum key range value and a maximum key range value that may differ from said minimum key range value; and

notifying said requester of the transition of said subset of said list between an empty state and a not-empty state.

14. In an information handling system in which operations are performed on a list structure by a list structure processor in response to requests received from a requester, a method of processing a list structure, comprising the steps of:

defining as a part of said list structure a list comprising a sequence of list entries;

selecting in accordance with a user-provided value a threshold defining the transition of a subset of said list between an empty state and a not-empty state; and

notifying said requester of the transition of said subset of said list between one of said states and the other of said states as defined by said threshold.

15. The method of claim 14 in which said transition is from said not-empty state to said empty state.

16. The method of claim 14 in which said transition is from said empty state to said not-empty state.

17. The method of claim 14 in which said step of selecting said threshold comprises the steps of:

selecting a first threshold defining the transition of said subset of said list from an empty state to a not-empty state; and

selecting a second threshold defining the transition of said subset of said list from a not-empty state to an empty state.

18. The method of claim 14 in which said subset of said list is the entire list.

19. The method of claim 14 in which each of said list entries has an associated list entry key and in which said subset of said list comprises a subset having list entry keys falling within a predetermined key range.

20. In an information handling system in which operations are performed on a list structure by a list structure processor in response to requests received from a requester, a method of processing a list structure, comprising the steps of:

defining as a part of said list structure a list comprising a sequence of list entries;

defining a first mode of operation in which said requester is notified of the addition of each entry to a subset of said list; and

defining a second mode of operation in which said requester is notified only of the addition of a first entry to said subset of said list.

21. In an information handling system in which operations are performed on a list structure by a list structure processor in response to requests received from a requester, a method of processing a list structure, comprising the steps of:

defining as a part of said list structure a list comprising a sequence of list entries, each of said list entries having an associated primary list entry key;

defining a secondary key indicator for said list, said secondary key indicator indicating whether each of said list entries only has said associated primary list entry key or also has an associated secondary list entry key;

creating list entries having only said primary list entry keys if said secondary key indicator indicates that said list entries only have said associated primary list entry keys; and

creating list entries having said primary list entry keys and said secondary list entry keys if said secondary key indicator indicates that said list entries also have said associated secondary list entry keys.

22. A program storage device readable by a machine, tangibly embodying a program of instructions executable by the machine to perform the method steps of any one of claims 1-3, 13-14, and 20-21.

23. The method of claim 21, comprising the further step of locating said list entries by said secondary list entry keys.

24. The method of claim 21, comprising the further step of conditionally processing said list entries based upon a comparison of said secondary list entry keys.

25. In an information handling system in which opera ons are performed on a list structure by a list structure processor in response to requests received from a requester, apparatus for processing a list structure, comprising:

means for defining as a part of said list structure a list comprising a sequence of list entries, each of said list entries being uniquely identified by an associated list entry identifier;

means for defining a list entry identifier indicator for said list, said list entry identifier indicator indicating whether said list entry identifiers are generated by said list structure processor or supplied by said requester;

means for creating list entries having said list entry identifiers generated by said list structure processor if said list entry identifier indicator indicates that said list entry identifiers are generated by said list structure processor; and

means for creating list entries having said list entry identifiers supplied by said requester if said list entry identifier indicator indicates that said list entry identifiers are supplied by said requester.

26. In an information handling system in which operations are performed on a list structure by a list structure processor in response to requests received from a requester, apparatus for processing a list structure, comprising:

means for defining as a part of said list structure a list comprising a sequence of list entries, each of said list entries having an associated list entry key;

means for specifying for each of one or more source list entries in said list a target list entry key and a target list;

means for changing the list entry key of each of said source list entries to the target list entry key specified for the source list entry; and

means for moving each of said source list entries to the target list specified for the source list entry.

27. In an information handling system in which operations are performed on a list structure by a list structure processor in response to requests received from a requester, apparatus for processing a list structure, comprising:

means for defining as a part of said list structure a list comprising a sequence of list entries, each of said list entries having an associated list entry key;

means for defining one or more comparison list entry keys;

means for receiving a user input defining a type of comparison operation between a list entry key associated with one of said list entries and said one or more comparison list entry keys; and

performing a comparison operation of the defined type on said associated list entry key and said one or more comparison list entry keys.

28. The apparatus of claim 27, further comprising:

means for performing a further operation on said list entry in accordance with the results of said comparison operation.

29. In an information handing system in which operations are performed on a list structure by a list structure processor in response to requests received from a requester, apparatus for processing a list structure, comprising:

means for defining as a part of said list structure a list comprising a sequence of list entries, each of said list entries having an associated list entry key;

means for defining a subset of said list having list entry keys falling within a predetermined range of values extending between a minimum key range value and a maximum key range value that may differ from said minimum key range value; and

means for notifying said requester of the transition of said subset of said list between an empty state and a not-empty state.

30. In an information handing system in which operations are performed on a list structure by a list structure processor in response to requests received from a requester, apparatus for processing a list structure, comprising:

means for defining as a part of said list structure a list comprising a sequence of list entries;

means for selecting in accordance with a user-provided value a threshold defining the transition of a subset of said list between an empty state and a not-empty state; and

means for notifying said requester of the transition of said subset of said list between one of said states and the other of said states as defined by said threshold.

31. The apparatus of claim 30 in which said means for selecting said threshold comprises:

means for selecting a first threshold defining the transition of said subset of said list from an empty state to a not-empty state; and

means for selecting a second threshold defining the transition of said subset of said list from a not-empty state to an empty state.

32. In an information handing system in which operations are performed on a list structure by a list structure processor in response to requests received from a requester, apparatus for processing a list structure, comprising:

means for defining as a part of said list structure a list comprising a sequence of list entries;

means for defining a first mode of operation in which said requester is notified of the addition of each entry to a subset of said list; and

means for defining a second mode of operation in which said requester is notified only of the addition of a first entry to said subset of said list.

33. In an information handing system in which operations are performed on a list structure by a list structure processor in response to requests received from a requester, apparatus for processing a list structure, comprising:

means for defining as a part of said list structure a list comprising a sequence of list entries, each of said list entries having an associated primary list entry key;

means for defining a secondary key indicator for said list, said secondary key indicator indicating whether each of said list entries only has said associated primary list entry key or also has an associated secondary list entry key;

means for creating list entries having only said primary list entry keys if said secondary key indicator indicates that said list entries only have said associated primary list entry keys; and

means for creating list entries having said primary list entry keys and said secondary list entry keys if said secondary key indicator indicates that said list entries also have said associated secondary list entry keys.

34. The apparatus of claim 33, further comprising means for locating said list entries by said secondary list entry keys.

35. The apparatus of claim 33, further comprising means for conditionally processing said list entries based upon a comparison of said secondary list entry keys.


Description

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to a method and apparatus for managing a list structure and, more particularly, to extensions to the architecture of a list processor that render it especially suitable for processing shared message queues.

2. Description of the Related Art

IBM's MQSeries® is a set of middleware products that allow user applications to intercommunicate using messages, without having to know the complexities of the underlying hardware and software platform. Applications communicate using the MQSeries application programming interface (API), issuing such calls as MQPUT to put a message onto a queue and MQGET to get a message from a queue. MQSeries is described in such publications as MQSeries Planning Guide, IBM GC33-1349-07 (January 1999), incorporated herein by reference.

The IBM S/390® Parallel Sysplex® configuration is a cluster of interconnected processing nodes with attachments to shared storage devices, network controllers, and core cluster technology components, consisting of coupling facilities, coupling support facilities, and external time references (ETRs). A coupling facility (CF) enables high-performance read/write sharing of data by applications running on each node of the cluster through global locking and cache coherency management mechanisms. It also provides cluster-wide queuing mechanisms for workload distribution and message passing between nodes.

The coupling facility is described in the following patents and publications, incorporated herein by reference:

    • "In a Multiprocessing System Having a Coupling Facility, Communicating Messages Between the Processors and the Coupling Facility in Either a Synchronous Operation or an Asynchronous Operation", by D. A. Elko et al., Ser. No. 08/420,893, Filed Apr. 11, 1995, now U.S. Pat. No. 5,561,809;
    • "Sysplex Shared Data Coherency Method And Means", by D. A. Elko et al., Ser. No. 07/860,805, Filed Mar. 30, 1992, now U.S. Pat. No. 5,537,574;
    • "Method And Apparatus For Distributed Locking Of Shared Data, Employing A Central Coupling Facility", by D. A. Elko et al., Ser. No. 07/860,808, Filed Mar. 30, 1992, now U.S. Pat. No. 5,339,427;
    • "Command Quiesce Function", by D. A. Elko et al., Ser. No. 07/860,330, Filed Mar. 30, 1992, now U.S. Pat. No. 5,339,405;
    • "Software Cache Management Of A Shared Electronic Store In A Sysplex", by D. A. Elko et al., Ser. No. 07/860,807, Filed Mar. 30, 1992, now U.S. Pat. No. 5,457,793;
    • "Multiple Processor System Having Software For Selecting Shared Cache Entries Of An Associated Castout Class For Transfer To A DASD With One I/O Operation", by D. A. Elko et al, Ser. No. 07/860,806, Filed Mar. 30, 1992, now U.S. Pat. No. 5,493,668;
    • "Command Execution System For Using First And Second Commands To Reserve And Store Second Command Related Status Information In Memory Portion Respectively", by D. A. Elko et al., Ser. No. 07/860,378, Filed Mar. 30, 1992, now U.S. Pat. No. 5,392,397;
    • "Integrity Of Data Objects Used To Maintain State Information For Shared Data At A Local Complex", by D. A. Elko et al, Ser. No. 07/860,800, Filed Mar. 30, 1992, now U.S. Pat. No. 5,331,673;
    • "Management Of Data Objects Used To Maintain State Information For Shared Data At A Local Complex", by J. A. Frey et al, Ser. No. 07/860,797, Filed Mar. 30, 1992, now U.S. Pat. No. 5,388,266;
    • "Clearing Data Objects Used To Maintain State Information For Shared Data At A Local Complex When At Least One Message Path To The Local Complex Cannot Be Recovered", by J. A. Frey et al., Ser. No. 07/860,647, Filed Mar. 30, 1992, now U.S. Pat. No. 5,394,542;
    • "Coupling Facility For Receiving Commands From Plurality Of Hosts For Activating Selected Connection Paths To I/O Devices And Maintaining Status Thereof", by D. A. Elko. et al., Ser. No. 08/324,447, Filed Oct. 18, 1994, now U.S. Pat. No. 5,463,736;
    • "Data Processing System And Method For Providing Notification In A Central Processor Of State Changes For Shared Data Structure On External Storage", by J. A. Frey et al., Ser. No. 07/860,809, Filed Mar. 30, 1992, now U.S. Pat. No. 5,390,328;
    • "Method And Apparatus For Performing Conditional Operations On Externally Shared Data", by J. A. Frey et al., Ser. No. 08/383,532, Filed Feb. 1, 1995, now U.S. Pat. No. 5,742,830;
    • "Apparatus And Method For List Management In A Coupled Data Processing System", by J. A. Frey et al., Ser. No. 07/860,633, Filed Mar. 30, 1992, now U.S. Pat. No. 5,410,695;
    • "Interdicting I/O And Messaging Operations In A Multi-System Complex", by D. A. Elko et al., Ser. No. 07/860,489, Filed Mar. 30, 1992, now U.S. Pat. No. 5,394,554;
    • "Method And Apparatus For Coupling Data Processing Systems", by D. A. Elko et al., Ser. No. 07/860,803, Filed Mar. 30, 1992, now U.S. Pat. No. 5,317,739;
    • "Authorization Method For Conditional Command Execution", by D. A. Elko et al., Ser. No. 08/408,446, Filed Mar. 22, 1995, now U.S. Pat. No. 5,450,590;
    • "Dynamically As signing a Dump Space in a Shared Data Facility to Receive Dumping Information to be Captured", by D. A. Elko et al., Ser. No. 08/471,895, Filed Jun. 7, 1995, now U.S. Pat. No. 5,664,155;
    • "Method And System For Capturing and Controlling Access To Information In A Coupling Facility", by D. E. Neuhard et al., Ser. No. 08/146,647, filed Nov. 1, 1993, now U.S. Pat. No. 5,630,050;
    • "Method and System for Determining and Overriding Information Unavailability Time at a Coupling Facility", by D. A. Neuhard et al., Serial. No. 08/779,196, filed Jan. 6, 1997, now U.S. Pat. No. 5,875,484;
    • "Requesting a Dump of Information Stored within a Coupling Facility, in Which the Dump Includes Serviceability Information from an Operating System That Lost Communication with the Coupling Facility", by D. A. Neuhard et al., Serial. No. 08/779,195, filed Jan. 6, 1997, now U.S. Pat. No. 5,860,115;
    • "Method and Apparatus for Expansion, Contraction, and Reapportionment of Structured External Storage Structures", by D. J. Dahlen et al., Ser. No. 08/304,458, filed Sep. 12, 1994, now U.S. Pat. No. 5,581,737;
    • "Method of Managing Resources in One or More Coupling Facilities Coupled to One or More Operating Systems in One or More Central Programming Complexes Using a Policy", by R. A. Allen et al., Ser. No. 08/607,053, filed Feb. 26, 1996, now U.S. Pat. No. 5,634,072;
    • "Method and System for Managing Data and Users of Data in a Data Processing System", by R. A. Allen, Ser. No. 08/146,727, filed Nov. 1, 1993, now U.S. Pat. No. 5,465,359;
    • "Method and System for Reconfiguring a Storage Structure Within a Structure Processing Facility", by R. A. Allen et al., Ser. No. 08/544,941, filed Oct. 18, 1995, now U.S. Pat. No. 5,515,499;
    • "Method for Coordinating Executing Programs in a Data Processing System", by R. A. Allen et al., Ser. No. 08/439,269, filed May 9, 1995, now U.S. Pat. No. 5,604,863;
    • "Coherence Controls for Store-Multiple Shared Data Coordinated by Cache Directory Entries in a Shared Electronic Storage", by K. S. Carpenter et al., Ser. No. 08/148,707, filed Nov. 8, 1993, now U.S. Pat. No. 5,544,345;
    • "Method and System for Log Management in a Coupled Data Processing System", by R. V. Geiner et al., Ser. No. 08/632,683, filed Apr. 15, 1996, now U.S. Pat. No. 5,737,600; and
    • J. M. Nick et al., "S/390 cluster technology: Parallel Sysplex", IBM Systems Journal, vol. 36, no. 2, 1997, pages 172-201.


  • It would be desirable to be able to use the list-processing capabilities of the coupling facility to implement a message queue that is shared by queue managers residing on different systems across a sysplex. To be suitable for this purpose, the CF list architecture should allow MQSeries to efficiently implement the following message-queuing semantics:
  • 1. A message must be uniquely identified.
  • 2. A message put cannot be visible to other units of work (UOWs) until it is committed.
    • When a message is written by a UOW, it must not be visible to other units of work anywhere in the queue-sharing group (QSG) until the message is committed. The uncommitted message however is available to the unit of work that wrote it.
  • 3. Committed messages must be maintained in proper sequence.
    • Committed messages eligible to be read must be in priority sequence, from highest priority to lowest priority. If there are multiple messages with the same priority, then the set of messages must be maintained in order of arrival sequence within designated priority.
  • 4. Messages read must be unavailable to others UOWs in the QSG.
    • When a committed message is read by a unit of work, then no other unit of work anywhere in the queue-sharing group can read the same message. If the message that is read is committed, it must be deleted from the CF list structure so that it is never visible again to another unit of work.
  • 5. Messages read that are backed out must be reinserted into their proper committed positions with respect to both priority and time of arrival.
    • If the message that was read is backed out, it must again become visible to other units of work executing in the queue-sharing group. When the message is backed out, it must be reinserted into the committed portion of a list with respect to both its priority and its time of arrival (when the message was originally put).
  • 6. Committing and aborting messages for a UOW must be efficient.


  • SUMMARY OF THE INVENTION

    The present invention contemplates extensions to the CF list architecture that allow MQSeries to efficiently exploit the CF list model and provide for shared queues in a Parallel Sysplex emvironment. The present invention is not limited to use in a message queueing environment, however, but may be used in other applications as well.

    One aspect of the present invention contemplates a program-specified unique list entry identifier (ID) in place of the list entry ID generated by the system. In a parallel implementation of MQSeries, the CF list architecture should allow user-generated list entry identifiers to be used as a direct entry-locating mechanism in order to insure that the identifier for each list entry is unique across CF list structures and consistent between MQSeries queue managers.

    MQSeries could accomplish this in the existing architecture by using list entry names. However, entry names and entry keys are mutually exclusive means of specifying list entries, and MQSeries also requires the use of entry keys for identifying list entries. MQSeries requires a function that is equivalent to that provided today by entry IDs as a direct means of addressing a list entry in a list structure. Currently, however, entry IDs are generated internally by the coupling facility.

    In accordance with one aspect of the invention, a new list structure control—a program list entry identifier indicator, or PLEIDI—is defined to allow the user to specify whether user-defined entry IDs are used when the list is allocated. This new option is provided as an attribute of list structure allocation.

    Corresponding modifications may be made to the operating system components that exploit the CF list architecture. Thus, in the case of the OS/390 component known as Sysplex Services for Data Sharing (XES), an optional input may be added to the XES Connection Service that indicates whether the user wishes to provide unique list entry ID values or the system should generate entry ID values for each list entry created for the structure.

    A connect request is rejected if the connector's requested attribute does not match the attribute in effect for the current allocated instance of the structure. In a preferred embodiment, list entry ID type is consistent for a whole list structure. Either all list entries in the structure are referenced by entry IDs generated by the system, or all list entries are referenced by entry IDs provided by the user.

    Another aspect of the present invention contemplates a new delete list (DL) command. MQSeries requires an efficient means to delete entries from a given list without knowledge of the specific list entry IDs of the entries to be deleted. In accordance with this aspect of the invention, a new delete list command is added that sequentially processes list entries in the order in which they exist on the specified list. The starting point for the list entry selection is specified by the head or tail of the list, entry ID, entry name, entry key, secondary key or list cursor. The new delete list command allows specific criteria to be specified that provides a means to target only particular entries to be processed for deletion. This command scans entries on a particular list and does not involve a scan of the entire structure.

    The present invention also contemplates a new move list entries (MLES) command. A new command of this type is required by MQSeries to optimize the performance of two of their critical processes: committing MQPUT list entries and backing out of MQGET list entries. This requires updating each affected list entry, either by changing the list entry key while keeping the list entry on the same physical list in the CF list structure or by moving the list entry from one list back to its original list while the list entry key for the list entry remains unchanged. In accordance with this aspect of the invention, a new move list entries command has been added that provides a performance-optimized means to process an input list of entries. Each list entry in the input list may be moved to a new position on a list in the CF list structure by updating the list entry key, or each list entry may be moved from one list to another list in the coupling facility list structure by specifying a new target list number. The new move list entries command allows both the list number and the list entry key for a list entry to be updated.

    The new move list entries (MLES) command is a multiple-list entry command, which takes as input a list of specified entries to be processed. The move list entries command takes a list of entries identified by list entry ID or name. For each entry in the input list a target list number, a target list entry key and a target secondary key may be provided.

    In a preferred embodiment, a new input parameter—granular version number comparison (GVNC)—is provided on the move list entries (MLES) command to allow the user to optionally perform granular version number comparison. The move list entries command also allows granular version number replacement given the granular version number comparison was successful. A specified set of compare and replace criteria may be specified for each entry in the input entry list.

    In a preferred embodiment, the input operand granular version number comparison (GVNC) is also added to the delete list entries (DLES) command to allow the user to optionally perform granular version number comparisons with a specified compare value criterion specified for each entry in the input entry list. Currently, the DLES command supports nongranular comparison functions, that is, comparison is performed between a single specified compare value and each of the entries in the input entry list. By adding the granular version number comparison to both DLES and MLES, the commands are kept consistent. However, the DLES command is preferably not changed to support version number replacement because version number replacement on a delete request is not supported by the architecture; updating an entry that will be deleted does not make sense.

    In a preferred embodiment, another new operand—halt on miscompare (HOM)—is added to the move list entries (MLES) and delete list entries (DLES) commands to allow the user to specify whether execution should halt when a miscompare is encountered or continue to the next entry as is done currently. Miscompares may occur on the list entry version number, list entry key, list entry secondary key or list number. Currently, these commands skip an entry if a miscompare is encountered and continue processing with the next entry in the input list. This leads to the unfortunate circumstance that when any comparisons are requested, it is not possible for the user to determine which entries in the input entry list were deleted and which were skipped due to a miscompare because, upon completion the request only tells you how many entries were deleted.

    Another aspect of the present invention contemplates key comparison enhancements to the CF list architecture. MQSeries uses entry keys and entry version numbers to identify the list entries by MQSeries queue manager and priority. To accomplish this, key comparison enhancements have been added for both single- and multiple-entry commands. The key compare functions that have been added are as follows:
  • 1. Location by keyed position has been enhanced to include operator types of range, less than or equal, and greater than or equal, for entry location of the first list entry to process on the read list (RL) and delete list (DL) commands.
  • 2. For multiple-entry commands (i.e., commands for deleting, moving, reading and/or writing multiple list entries), the operands key request type (KRT), list entry key (LEK) and maximum list entry key (MLEK) (together with similar operands for the secondary keys described below) provide key comparison function operators of range, as well as key comparison function operators for less than or equal, and greater than or equal.
  • 3. For single-list entry commands (i.e., commands for deleting, moving, reading and/or writing a single list entry), the operand key request type (KRT) (together with similar operands for the secondary keys described below) provides key comparison function operators of equal, less than or equal, and greater than or equal.


  • Yet another aspect of the present invention contemplates the following list monitoring enhancements:
  • 1. List monitoring for a key range or a "subset of sublists".
    • Currently, there are two levels of list notifications in the list model: (1) whole-list notification, to determine if the list is empty or not; and (2) sublist notification, to determine if the sublist defined by a list number and an entry key value is empty or not. This is not sufficient for MQSeries, which needs to be able to monitor lists with a granularity that lies between these two functions.
    • As described in the related application referenced above, MQSeries uses key values to group entries on a list into two ranges: committed entries and uncommitted entries. It would be desirable to know whether the set of committed entries on a list is empty or not, without actually having to access the CF to do so. To accomplish this, in a preferred embodiment, new list controls called key range (minimum) list entry key (KRLEK) and key range maximum list entry key (KRMLEK) are defined for each list to allow list monitoring to be set up for a range of keys. These list controls may be updated using the write list controls (WLC) command or read using the read list controls (RLC) command. Suitable means allow a user to start or stop monitoring the key range.
  • 2. List and key range threshold notification.
    • In a preferred embodiment, new list controls are added that allow the user to modify the list and key range empty-to-not-empty or not-empty-to-empty notification thresholds. These list controls, described below, may be updated using the write list controls (WLC) command.
    • The list empty notification threshold (LENT) is the number of list entries that must remain in the list to suppress a not-empty to empty list notification. The key range empty notification threshold (KRENT) is the number of list entries that must remain in the key range to suppress a not-empty to empty list notification A list or key range is considered empty when there are no entries on the list or when the list contains fewer list entries than the list or key range empty threshold. The list or key range may be considered empty even though there are still entries on the list or in the key range if the number of entries have not exceeded the list or key range empty threshold.
    • Similarly, the list not-empty notification threshold (LNENT) is the number of list entries that must be included in the list before an empty to not-empty list notification is generated, while the key range not-empty notification threshold (KRNENT) is the number of list entries that must be included in the key range before an empty to not-empty list notification is generated. A list or key range is considered not-empty when the number of list entries on the list is greater than the list or key range not-empty threshold. The list or key range may still be considered empty even there are entries on the list or in the key range, if the number of entries have not exceeded the list or key range not-empty count.
    • The initial value of the list and key range empty and not-empty thresholds is zero.
  • 3. Aggressive sublist notification.
    • In a preferred embodiment, a new event monitor control called an aggressive not-empty notification indicator (ANENI) is added to allow the user to specify whether, when monitoring a sublist, event monitor controls (EMCs) should be queued to the user's event queue for only the first entry added to the sublist or for each entry that is added to the sublist.


  • Yet another aspect of the present invention relates to keys. A new type of key, called a secondary key or, more particularly, a secondary list entry key (SLEK), is introduced that allows the user to specify a secondary key value as a means to identify a list entry. Secondary keys are associated with respective list entries and represent a second key ordering for each list in a CF list structure. A secondary key for an entry may be initialized, or set to null, when the entry is created. Secondary keys exist in parallel with primary keys and may be used and updated in a similar manner, as described below. In a preferred embodiment, a new list structure control called a secondary key indicator (SKI) is defined to allow for creation of secondary key control structures when the list is allocated. This allows the user to specify whether the keyed list structure should be allocated with only primary entry keys or with both primary and secondary entry keys.

    BRIEF DESCRIPTION OF THE DRAWINGS

    FIG. 1 shows a multiple-system complex (sysplex) incorporating the present invention.

    FIG. 2 shows a put list associated with a particular shared queue, with committed and uncommitted portions.

    FIG. 3 shows a get list associated with a particular shared queue manager.

    FIG. 4 shows the format of a list entry key falling within the uncommitted key range.

    FIG. 5 shows the format of a list entry key falling within the committed key range.

    FIG. 6 shows the movement of list entries between the uncommitted and committed portions of a put list.

    FIG. 7 shows the movement of list entries between a put list and a get list.

    FIG. 8A shows the procedure for writing a message to a queue.

    FIG. 8B shows the procedure for committing a write of a message to a queue.

    FIG. 8C shows the procedure for aborting a write of a message to a queue.

    FIG. 8D shows the procedure for reading (getting) a message from a queue.

    FIG. 8E shows the procedure for committing a read (get) of a message from a queue.

    FIG. 8F shows the procedure for aborting a read (get) of a message from a queue.

    FIG. 9 shows the coupling facility and the list structures that it contains.

    FIG. 10 shows a message command/response block.

    FIG. 11 shows a list structure.

    FIG. 12 shows a list.

    FIG. 13A shows a key range monitor table.

    FIG. 13B shows a list monitor table.

    FIG. 13C shows an event queue.

    DESCRIPTION OF THE PREFERRED EMBODIMENTS

    FIG. 1 shows the general configuration of a system complex (sysplex) 100 incorporating the present invention. Sysplex 100 comprises a plurality of systems 102 (an exemplary two of which, System A and System B, are shown), each of which is connected to a coupling facility (CF) 104 within which one or more shared message queues 106 are maintained. As is conventional, each system 102 comprises one or more processors and an operating system (not separately shown) and may constitute either a separate physical machine or a logical partition of a logically partitioned machine. Similarly, coupling facility 104 may constitute either a separate physical machine or a logical partition of a logically partitioned machine. Although the invention is not so limited, in a preferred embodiment the physical machines are IBM S/390 Parallel Enterprise Server® processors, while the operating system is the IBM OS/390® operating system.

    Within each system 102, user applications 110 perform sequences of operations, referred to herein as units of work (UOWs), on shared message queues 106 via a shared queue manager (SQM) 108 resident on that system. Shared queue managers 108 on different systems 102 that share the same message queue 106 are referred to herein as a queue-sharing group (QSG). In the preferred embodiment, each shared queue manager 108 in turn interacts with the coupling facility via a component 112 of the OS/390 operating system known as Sysplex Services for Data Sharing (XES). Sysplex Services for Data Sharing (XES) is described more fully in the IBM publication MVS/ESA Programming: Sysplex Services Guide, GC28-1495-02 (June 1995), incorporated herein by reference.

    User applications 110 on a system 102 interact with the shared queue manager 108 on that system via a series of Message Queue Interface (MQI) calls, the most important of which are MQPUT (to put a message onto a message queue 106) and MQGET (to get a message from a message queue 106). In response to such a call, shared queue manager 108 issues a call to XES 112 to invoke a requested system service (e.g., IXLLIST, IXLLSTC, IXLLSTE and IXLLSTM, as described below) to communicate with the coupling facility 104. In response to receiving a call from shared queue manager 108, XES 112 sends an appropriate message command block (MCB) containing data and other operands to the coupling facility 104 to perform the requested operation. XES 112 receives back from the coupling facility 104 a message response block (MRB) containing data and/or a response code.

    FIG. 10 shows the format of a message command/response block 1000 used for communications between the coupling facility 104 and a particular system 102. Message command/response block 1000 comprises a message command block (MCB) 1002, a message response block (MRB) 1004, and an optional data block 1006. Message command block 1002 contains a command block 1008 and request operands 1010. Similarly, message response block 1004 contains a response descriptor 1012 and response operands 1014. Command block 1008 contains a command code (CC) specifying the type of operation to be performed by coupling facility 104, while request operands 1010 constitute input parameters, as described below.

    As part of its list-processing capability, coupling facility 104 performs requested operations on lists composed of one or more entries. Referring now to FIGS. 2 and 3, in accordance with one aspect of the present invention, each logical message queue 106 is implemented as a set of lists: a put list 202, comprising a put list header (PLH) and optionally one or more list entries 204, and one or more get lists 206, each comprising a get list header (GLH) and optionally one or more list entries 204. (The terms "list" and "list header" are used interchangeably herein in view of their one-to-one correspondence.) Each put list 202 is associated with a particular shared queue 106 and is shared by the shared queue managers 108 in the queue-sharing group. Each get list 206, on the other hand, is associated with a particular shared queue manager 108 and may be used for multiple shared queues 106. Each list entry 204 corresponds to a message. (The terms "list entry" and "message" are used interchangeably herein.) Associated with each list entry 204, along with a message and other data, is a list entry key LEK that may be used to determine the order of the entry 204 in the list 202 or 206. Keys LEK form the basis for partitioning the put list 202 into a committed portion 208, in which the keys LEK fall within a committed key range, and an uncommitted portion 210, in which the keys LEK fall within an uncommitted key range that does not overlap the committed key range.

    Lists 202 and 206 and key ranges 208 and 210 supply the mechanism for writing, reading and committing messages 204 in accordance with the present invention. More particularly, the process of 'hiding' uncommitted messages 204, hiding messages 204 that have been read and making committed puts globally visible is done simply by movement between list headers 202 and 206 and/or key assignment changes without the use of any explicit locking protocols.

    The keys LEK that a list entry (message) 204 can be assigned are defined by the shared queue manager 108, as described below. Referring to FIGS. 4 and 8A, when a message 204 is initially put (step 802), it is first assigned the following 16-byte key LEK in the uncommitted key range (step 804):
    • 1 byte—value is X'F6'
    • 1 byte—queue manager ID (QMID) of the shared queue manager 108 that wrote the message 204
    • 1 byte—priority of the message 204
    • 8 bytes—UOW ID: 1-byte queue manager ID (QMID) concatenated with a 7-byte store clock (STCK) value
    • 2 bytes—put list header (PLH): the list header 202 to which the message 204 was put
    • 3 bytes—binary zeroes.


  • The set of list entries 204 whose key LEK begins with X'F6' define the uncommitted portion 210 of the (put) list header 202.

    Referring to FIGS. 6 and 8B, when an uncommitted message 204 (first byte of key LEK is X'F6') is committed (step 806), it is moved from the uncommitted portion 210 of the list header 202 to the committed portion 208 of the same list header 202. In this case, the list entry 204 moves from one position on the list header 202 to another position on the same list header 202. The movement is accomplished by changing the list entry's key LEK so that it falls within the committed key range (step 808). Referring to FIG. 5, the uncommitted put key LEK is changed to the following:
    • 1 byte—priority in the inclusive range (0, 9)
    • 8 byte—STCK value (from the uncommitted key, see above)
    • 2 byte—put list header 202 (from the uncommitted key)
    • 1 byte—queue manager ID (QMID) of the shared queue manager 108 that wrote the message 204
    • 4 bytes—binary zeroes.


  • The set of list entries 204 whose keys begin with (00, 09) inclusive defines the committed portion 208 of the put list header 202.

    Referring to FIG. 8C, if a unit of work decides to abort a write of a message 204 (step 810), it deletes the message 204 from the uncommitted portion 210 of the put list 202 (step 812). This portion 210 of the put list is available only to the unit of work that originally wrote the message 204 and is invisible to other units of work.

    Referring to FIGS. 7 and 8D, when a unit of work requests the highest committed message 204 on a get request (step 814), only the committed portion 208 of the list header 202 is eligible to be scanned, that is, list entries 202 whose keys begin with (00, 09) inclusive. Entries 204 that begin with X'F6' do not participate in the scan.

    This is accomplished by using an IXLLSTE invocation (as described below) that examines the entry 204 at the head of the list 202 (step 816) and returns it only if the first byte of its key is in the inclusive range (00, 09). (This is referred to herein as key range checking on read.) If there are no messages 204 on the list header 202 or if the key of the message at the head of the list header begins with a value greater than or equal to X'F6' (step 818), then no message is returned (step 820).

    If there are committed messages 204, then the message 204 that is returned is the message at the head of the list header 202, since the messages 202 are in priority order and within priority by time of arrival. Thus, if the message 204 at the head of the list 202 is a committed message (step 818), then two things happen in an atomic fashion:
  • 1. The contents of the list entry 204 are copied from the list structure into virtual storage (step 822).
  • 2. The selected list entry 204 is moved to the 'reading' shared queue manager 108's uncommitted get queue 206 (step 824). This move operation makes the message 204 invisible to all other shared queue managers 108 in the queue-sharing group who issue a get request to the corresponding PLH 202. As noted earlier, in a list structure, each shared queue manager 108 is assigned its own uncommitted get list header 206.


  • Once the message 204 is moved to the shared queue manager 108's uncommitted get queue 206, it is no longer visible to other get requests because all get requests for the shared queue 106 reference the shared queue's put list header 202.

    The final disposition of the message read will be either commit or abort. Referring to FIG. 8E, if the disposition is commit (step 826), the message 204 is deleted from the shared queue manager 108's uncommitted get queue 206 (step 828). Referring to FIG. 8F, if the disposition is abort (step 830), then the message 204 is moved back to the committed put list header 202 from whence it came into its proper priority/time sequence position (step 832).

    The list architecture of coupling facility 104, insofar as it is pertinent to the present application, will now be described.

    Referring to FIG. 9, coupling facility 104 contains microcode 904, also referred to as coupling facility control code (CFCC), for managing one or more list structures 902. Referring to FIG. 11, each list structure 902 contains a set of list structure controls 1102, a list set 1104 comprising one or more lists 1106, user controls 1108, a lock table 1110 comprising one or more lock table entries (LTEs) 1112, and one or more event queue controls 1114 and corresponding event queues 1116.

    Referring to FIG. 12, each list 1106 contains list controls 1202 (including a a key range monitor 110 table 1204 and a list monitor table 1206) and, optionally, one or more list entries 1208. Each list entry 1208 in turn contains a set of list entry controls 1210 (including a list entry ID LEID and a list entry key LEK), a data list entry 1212 comprising one or more list elements (LEs) 1214, and an adjunct list entry 1216 (including a secondary list entry key SLEK if defined).

    List Structure Controls 1102

    The fixed list structure controls 1102 are initialized when the list structure 902 is created and remain unchanged until it is deallocated.

    The program-modifiable list structure controls 1102 are initialized when the list structure 902 is created. The program-modifiable control values may be changed by commands or CF processes.

    The fixed list structure controls 1102 are summarized in the following table.
    Fixed List Structure Controls Acronym
    List count LC
    List element characteristic LELX
    List structure type LST
    Maximum data list entry size MDLES
    Maximum structure size MXSS


    The program-modifiable list structure controls 1102 are summarized in the following table.
    Program-Modifiable List Structure Controls Acronym
    Entry reapportionment-in-progress indicator EREIPI
    Event monitor controls count EMCC
    List set element count LSELC
    List set entry count LSEC
    Maximum event monitor controls count MEMCC
    Maximum list set element count MLSELC
    Maximum list set entry count MLSEC
    Marginal structure size MRSS
    Minimum apportionable structure size MASS
    Pending entry-to-element ratio PETELR
    Structure authority SAU
    Structure size SS
    Structure size change indicator SSCI
    Target maximum element count TMELC
    Target maximum entry count TMEC
    Target maximum event monitor count TMEMC
    Target structure size TSS
    User identifier vector UIDV
    User structure control USC


    Entry Reapportionment-in-Progress Indicator (EREIPI): Indicates whether an entry-to-element reapportionment process is currently active for the list structure 902.

    Event Monitor Controls Count (EMCC): Specifies the number of event monitor controls objects 1306 currently in a list set 1104.

    Extended User Structure Control (EUSC): An extension to the user structure control.

    List Count (LC): Specifies the number of lists 1106 created.

    List Element Characteristic (LELX): Specifies the number of bytes in each list element 1214.

    List Set Cursor (LSCUR): An integer that is either zero or contains the value of the current list number in the list set scan process.

    List Set Element Count (LSELC): Specifies the number of list elements 1214 that have been assigned to list entries 1208 or retry-data blocks, or both, in the list set 1104.

    List Set Entry Count (LSEC): Specifies the number of existing list entries 1208 in the list set 1104.

    List Structure Type (LST): Indicates the list objects 1106 created on allocation. The first flag is a secondary key indicator (SKI), the second flag is a program list entry identifier indicator (PLEIDI), the third flag is a element count indicator (ECI), The fourth flag is a lock indicator (LI), the fifth flag is a data indicator (DI), the sixth flag is an adjunct indicator (AI), the seventh flag is a name indicator (NI), and the eighth flag is a key indicator (KI).

    The secondary key indicator indicates whether secondary keys are supported.

    The program list entry identifier indicator indicates whether the structure uses a coupling facility-assigned LEID value or a program-assigned LEID value.

    The element count indicator indicates whether (1) list entry count and list entry count limit are defined or, alternatively, (2) list element count and list element count limit are defined.

    The lock indicator indicates whether a lock table is created.

    The data and adjunct indicators indicate respectively whether list entries have data entries and adjunct entries.

    The name indicator indicates whether list entries are named.

    The key indicator indicates whether list entries are keyed.

    At least one of the lock, data or adjunct indicators is active (i.e., indicates that the condition is true). The name indicator and the key indicator are never both active. For the dequeue event monitor controls (DEMC), read event monitor controls (REMC), read event queue controls (REQC), and register event monitors (REMS) commands, the key indicator must be active; otherwise, the list structure type is invalid and a request exception is recognized.

    Marginal Structure Size (MRSS): Specifies the minimum number of 4K-byte units of CF storage that are required for the creation of the requested lock table entries 1112, lists 1106, and associated controls for the list structure 902, independent of either the storage increment size or the requested target entry-to-element ratio.

    Maximum Data List Entry Size (MDLES): Specifies the maximum size of the data list entry 1212 as an integral multiple of the list element size.

    Maximum Event Monitor Controls Count (MEMCC): Specifies the maximum number of possible event monitor controls objects 1306 in a list set 1104.

    Maximum List Set Element Count (MLSELC): Specifies the maximum number of list elements 1214 that are available for assignment to list entries 1208 or retry-data blocks, or both, in the list set 1104.

    Maximum List Set Entry Count (MLSEC): Specifies the maximum number of possible list entries 1208 in a list set 1104.

    Maximum Structure Size (MXSS): Specifies the maximum number of 4K-byte units of CF storage that can be allocated for the list 1106.

    Minimum Apportionable Structure Size (MASS): Specifies the minimum number of 4K-byte units of CF storage that can be allocated for the list 1106, in integral multiples of the CF storage increment, that are sufficient for creating the requested lock table entries 1112, lists 1106, associated controls, enough event monitor controls 1306 and list entries 1208 with their associated controls to substantially satisfy the target monitor-to-entry storage ratio, and enough entries and elements to substantially satisfy the target entry-to-element ratio.

    Monitor Reapportionment-in-Progress Indicator (MREIPI): Indicates whether a monitor-to-entry storage reapportionment process is currently active for the list structure 902.

    Pending Entry-to-Element Ratio (PETELR): Contains the last requested target entry-to-element ratio on an allocate list structure command. The PETELR object is updated when the list structure 902 is initially allocated and when a reapportionment process is initiated.

    Pending Monitor-to-Entry Storage Ratio (PMTESR): Contains the last requested target monitor-to-entry storage ratio on an allocate list structure command. The PMTESR object is updated when the list structure 902 has been initially allocated and a monitor-to-entry storage reapportionment process is requested.

    Reapportionment-in-Progress Indicator (REIPI): Indicates whether a reapportionment process is currently active for the list structure 902.

    Structure Authority (SAU): A value associated with each bit in the SID vector.

    Structure Size (SS): Specifies the number of 4K-byte units allocated.

    Structure Size Change Indicator (SSCI): Indicates whether an expansion or contraction process is currently active for the list structure 902.

    Target Maximum Element Count (TMELC): Specifies the target for the maximum number of list elements 1214 that are available for assignment to list entries 1208 or retry-data blocks, or both, in the list set 1104.

    Target Maximum Entry Count (TMEC): Specifies the target for the maximum number of possible list entries 1208 in a list set 1104.

    Target Maximum Event Monitor Count (TMEMC): Specifies the target for the maximum number of event monitor controls objects 1306 that are available for registration of interest in subsidiary lists within the list set 1104.

    Target Structure Size (TSS): Specifies the target number of 4K-byte units to be allocated.

    User Identifier Vector (UIDV): A bit string with an initial value of zero. The bit positions start at zero and increase sequentially to the user identifier limit. The bit at position (i) in the string is set to one when a user is assigned with a UID value of (i). The bit at position (i) is reset to zero when a user is unassigned.

    User Structure Control (USC): A field per structure defined by the user.

    User Controls 1108

    The user controls 1108 are created and initialized when a list structure user (such as a CF Manager component of shared queue manager 108, as described below) is assigned and are deleted when the list structure user is unassigned.
    • The user controls 1108 are summarized in the following table.
  • User Controls Acronym
    List notification token LNT
    System identifier SYID
    User attachment control UAC
    User authority UAU
    User state US


    List Notification Token (LNT): Specifies a list notification vector to the system.

    System Identifier (SYID): A value specified by the program when a message path is activated. The system identifier is maintained in the message path status vector and copied into the user controls 1108 when an attach list structure user command is communicated over the message path.

    User Attachment Control (UAC): A field per attached user defined by the user.

    User Authority (UAU): A value that is compared and conditionally updated.

    User State (US): Specifies whether the user is attached.

    Lock Table 1110

    The lock table 1110 is a sequence of objects 1112, called lock table entries. The number of lock table entries 1112 is determined when the table is created. The lock table entries 1112 are numbered from zero to the lock table entry count less one.

    Each lock table entry 1112 has a global lock manager (GLM) object and an optional local lock managers (LLM) object. A lock table entry 1112 whose size is one byte has only a global lock manager object. When a lock table entry size is greater than one byte, the leftmost byte is the global lock manager object, and the remaining bytes form the local lock managers object. Lock tables 1110 with an entry size of one byte do not support local lock managers. Lock tables 1110 with an entry size of at least two bytes do support local lock managers.

    The global lock manager object of a lock table entry 1112 contains an unsigned binary number called a user identifier.

    The local lock managers object of a lock table entry 1112 contains a string of local lock bits, where each bit represents a user identifier. The bits in the object are numbered from left to right, starting at the value zero and proceeding upward to the bit for the highest valid user identifier.

    The lock table objects have a value of zero when the table is allocated and may be modified by subsequent commands.

    Event Queue Controls 1114

    There is an event queue controls object 1114 for each event queue 1116 in a list structure 902. All of the event queue controls of an event queue 1116 with the exception of the key type, are initialized to zero when the event queue 1116 is created or when the associated list structure user is detached. The key type is initialized to primary for the primary event queue controls and is initialized to secondary for the secondary event queue controls.

    The event queue controls are summarized in the following table.
    Event Queue Controls Acronym
    Event monitor controls queued count EMCQC
    Event notification entry number ENEN
    Event notification request type ENRT
    Event queue monitoring active bit EQMAB
    Event queue transition count EQTC
    Key type KT


    Event Monitor Controls Queued Count (EMCQC): Specifies the number of event monitor controls 1306 currently queued to the event queue 1116.

    Event Notification Entry Number (ENEN): Specifies a list notification vector entry associated with an event queue 1116.

    Event Notification Request Type (ENRT): Indicates whether the list notification vector summaries are to be updated when an empty to not-empty state transition occurs on an event queue 1116. When active, this flag causes a user to be notified of empty-to-not empty transitions.

    Event Queue Monitoring Active Bit (EQMAB): Specifies whether the user associated with the event queue 1116 is monitoring the event queue 1116.

    Event Queue Transition Count (EQTC): Specifies the number of empty to not-empty event queue transitions that have occurred.

    Key Type (KT): Indicates the key type (primary or secondary) of the event monitor controls 1306 that are queued on the event queue 1116. If the key type is primary, EMCs are queued for primary subsidiary lists; if the key type is secondary, EMCs are queued for secondary subsidiary lists.

    Event Queue 1116

    An event queue 1116 is a sequence of objects called event monitor controls 1306 (FIG. 13C). There are zero, one, or two event queues 1116 created for each list structure user when the list structure 902 is allocated, depending on the list structure type. When the list structure 902 does not have keys, no event queues 1116 are created. When the list structure 902 has keys but not secondary keys, a single event queue 1116 is created for each user. This is referred to either as the event queue 1116 or the primary event queue 1116 When the list structure 902 has both keys and secondary keys, two event queues 1116 are created, a primary event queue 1116 that contains EMCs with list entry keys, and a secondary event queue 1116 that contains EMCs with secondary list entry keys. The event queues 1116 are deleted when the list structure 902 is deallocated.

    An event monitor controls object 1306 is always queued to the rightmost position and dequeued from the leftmost position of the queue.

    An event monitor controls object 1306 may be queued when (1) an empty to not-empty state transition occurs for a monitored subsidiary list, (2) notification of the initial subsidiary list state is requested on registration, or (3) a not-empty to not-empty state transition occurs for a monitored subsidiary list. An event monitor controls object 1306 may be withdrawn when a not-empty to empty state transition occurs for a monitored subsidiary list or when notification of the initial subsidiary list state is requested on registration, may be dequeued by means of the dequeue event monitor controls command, and may be deleted when a user deregisters interest in the subsidiary list or detaches from the list structure 902.

    List 1106

    A list 1106 is a sequence of objects 1208, called list entries. The number of possible entries 1208, from one to 232, is determined when the list structure 902 is created.

    The relative position of a list entry 1208 in the sequence is determined when the entry is created and may be changed when any list entry 1208 is created, deleted, or moved.

    A list entry 1208 is located by means of a list entry identifier, list entry name, or by position. List positions may be ordered by the time sequence of when list entries 1208 are created on or moved to a list 1106 or list positions may be in key order. There may be one or two key orderings for a list 1106. If there is only one key ordering then list positions are ordered by increasing values of the list entry key. If two key orderings exist, then the primary key ordering is by increasing values of the list entry key and the secondary key ordering is by increasing values of the secondary list entry key.

    The size of the largest list 1106 is limited by the free space and the size of all the controls required to support the list structure 902.

    A list entry 1208 has up to two objects: a data list entry 1212 and an adjunct list entry 1216, depending on the list structure type.

    A data list entry consists of from one to MDLES list elements 1214. The data list entry size is determined when the data list entry is written. The list element size is a power of 2 that is at least 256 bytes. The adjunct list entry size is 64 bytes.

    A list entry 1208 exists when it is created and ceases to exist when it is deleted.

    Subsidiary List

    A subsidiary list is a list within a list 1106 where all list entries 1208 have the same key. There are two types, depending on the type of key. Primary subsidiary lists consist of list entries 1208 on the same list 1106 with the same list entry key. Secondary subsidiary lists consist of all list entries 1208 on the same list 1106 with the same secondary list entry key.

    A primary subsidiary list may only exist when a list set 1104 is created and the list entries 1208 are keyed. A secondary subsidiary list may only exist when a list set 1104 is created and secondary keys are supported in the structure.

    Adjunct Data Entry

    The adjunct data entry is a 64-byte storage object containing unformatted data. When the structure contains adjuncts and the adjunct format control bits in the list entry controls are inactive, the adjunct list entry is an adjunct data entry.

    Adjunct Secondary Key Entry: The adjunct secondary key entry is a storage object containing the secondary list entry key and a secondary adjunct data area. When the structure contains secondary keys and the adjunct secondary key entry indicator in the adjunct format control is active, the adjunct list entry is an adjunct secondary key entry.

    The adjunct secondary key entry objects are summarized in the following table.
    Adjunct Secondary Key Entry Acronym
    Secondary list entry key SLEK
    Secondary adjunct data entry SADE


    Secondary List Entry Key (SLEK): Partially designates the position of the list entry 1208 in the list 1106 in secondary key order.

    Secondary Adjunct Data Entry (SADE): A storage object containing unformatted data.

    List Controls 1202

    There is a list controls object 1202 for every list 1106 created in a list structure 902. All the list controls 1202 except the list entry count limit and the list element count limit are initialized to zero when the list structure 902 is created.

    The list controls 1202 are summarized in the following table.
    List Controls Acronym
    Assignment key AK
    Assignment key threshold AKT
    Cursor direction CDIR
    Key range empty notification threshold KRENT
    Key range list entry key KRLEK
    Key range maximum list entry key KRMLEK
    Key range monitor table KRMT
    Key range not-empty notification threshold KRNENT
    List authority LAU
    List cursor LCUR
    List element/list entry count LELC/LEC
    List element count/list entry count limit LELCL/LECL
    List empty notification threshold LENT
    List monitor table LMT
    List not-empty notification threshold LNENT
    List state transition count LSTC


    Assignment Key (AK): Specifies the value assigned to a list entry key when a key assignment operation is executed for a list entry 1208 that is moved or created on the list 1106.

    Assignment Key Threshold (AKT): Specifies the maximum value of an assignment key.

    Cursor Direction (CDIR): Indicates how the list cursor is updated (left to right or right to left) when the list cursor is maintained or initialized by a write list controls command.

    Key Range Empty Notification Threshold (KRENT): Specifies a number which is one less than the number of list entries 1208 that must remain in the key range to suppress a not-empty-to-empty list notification.

    Key Range List Entry Key (KRLEK): Specifies the lower value of the key range.

    Key Range Maximum List Entry Key (KRMLEK): Specifies the upper value of the key range.

    Key Range Not-empty Notification Threshold (KRNENT): Specifies one less than the number of list entries 1208 required in the key range in order to generate an empty-to-not-empty list notification.

    List Authority (LAU): A value that is compared and conditionally updated.

    List Cursor (LCUR): A list entry identifier that identifies a list cursor position.

    List Element Count (LELC): Specifies the number of list elements 1214 currently in the list 1106.

    List Element Count Limit (LELCL): Specifies the maximum number of possible list elements 1214 in a list 1106.

    List Empty Notification Threshold (LENT): Specifies a number which is one less than the number of list entries 1208 that must remain in the list 1106 to suppress a not-empty-to-empty list notification.

    List Not-empty Notification Threshold (LNENT): Specifies one less than the number of list entries 1208 required on the list 1106 in order to generate an empty-to-not-empty list notification.

    List Entry Count (LEC): Specifies the number of list entries 1208 currently in the list 1106.

    List Entry Count Limit (LECL): Specifies the maximum number of possible list entries 1208 in a list 1106.

    Key Range Monitor Table 1204

    The key range monitor table 1204 contains information used to process the list notification vector of each user who has registered interest in key range state transitions.

    The key range monitor table 1204 is a sequence of objects 1302 (FIG. 13A), called key range monitor table entries. The number of key range monitor table entries 1302 is determined when the table is created and is equal to the maximum number of list structure users plus one. The key range monitor table entries 1302 are numbered from zero to the user identifier limit.

    Each key range monitor table entry 1302 has a key range monitoring active bit object, a key range notification request type object and key range notification entry number object.

    Key Range Monitoring Active Bit (KRMAB): Specifies whether the user associated with the key range monitor table entry 1302 is monitoring the key range.

    Key Range Notification Entry Number (KRNEN): Specifies a list notification vector entry associated with a monitored key range.

    Key Range Notification Request Type (KRNRT): Indicates whether the list notification vector summaries are to be updated when an empty to not-empty state transition occurs on a monitored key range. When active, this flag causes the user to be notified of empty-to-not empty transitions.

    Key range monitor table entry 1302
    Key Range Monitor Table Entry Object Acronym
    Key range monitor active bit KRMAB
    Key range notification request type KRNRT
    Key range notification entry number KRNEN

    List Monitor Table 1206

    The list monitor table 1206 contains information used to process the list notification vector of each user who has registered interest in the state transitions of the list 1106.

    The list monitor table 1206 is a sequence of objects 1304 (FIG. 13B), called list monitor table entries. The number of list monitor table entries 1304 is determined when the table is created and is equal to the maximum number of list structure users plus one.

    The list monitor table entries 1304 are numbered from zero to the user identifier limit.

    Each list monitor table entry 1304 has a list monitoring active bit object, a list notification request type object and a list notification entry number object.

    List Monitoring Active Bit (LMAB): Specifies whether the user associated with the list monitor table entry 1304 is monitoring the list.

    List Notification Entry Number (LNEN): Specifies a list notification vector entry associated with a monitored list 1106.

    List Notification Request Type (LNRT): Indicates whether the list notification vector summaries are to be updated when an empty to not-empty state transition occurs on a monitored list 1106.

    List Monitor Table Entry
    List Monitor Table Entry Object Acronym
    List monitor active bit LMAB
    List notification request type LNRT
    List notification entry number LNEN

    List Entry Controls 1210

    There is a list entry controls object 1210 for every list entry 1208 within a structure. The list entry controls 1210 are initialized when a list entry 1208 is created and are deleted when a list entry 1208 is deleted. The list entry controls 1210 are summarized in the following table.
    List Entry Controls Acronym
    Adjunct format control AFC
    Data-list-entry size DLES
    List entry identifier LEID
    List entry key LEK
    List number LN
    Version number VN
    Adjunct data entry ADE


    Adjunct Format Control (AFC): A bit string consisting of adjunct format bits. Each bit is associated with a particular adjunct format. The adjunct format control bits include an adjunct secondary key entry indicator and (2) an adjunct lock entry indicator. The bits are mutually exclusive; at most one bit is active. When all the bits are inactive, the adjunct list entry 1216 is unformatted and contains the adjunct data entry.

    Data List Entry Size (DLES): Specifies the size of the data list entry 1212 as an integral multiple of the list element size.

    List Entry Identifier (LEID): Designates the list entry 1208.

    List Entry Key (LEK): Partially designates the position of the list entry 1208 in the list 1106.

    List Number (LN): Designates the list 1106 that the list entry 1208 is in.

    Event Monitor Controls 1306

    There is an event monitor controls object 1306 for every user and subsidiary list combination for which a user has currently registered interest. The number of possible event monitor controls 1306, from one to 232-1, is determined when the list structure 902 is created and may be changed when structure storage is expanded or contracted or the monitor-to-entry storage ratio is reapportioned.

    An event monitor controls object 1306 is created when a user initially registers interest and is deleted when a user deregisters interest in a subsidiary list or detaches from the list structure 902.

    All the event monitor controls 1306 except the event monitor queued indicator are initialized to the values provided as request operands 1010 during registration.

    The event monitor controls 1306 are summarized in the following table.
    Event Monitor Controls Acronym
    Aggressive not-empty notification indicator ANENI
    Event monitor queued indicator EMQI
    List entry key/Secondary list entry key LEK/SLEK
    List number LN
    Key type KT
    User identifier UID
    User notification control UNC


    Aggressive Not-empty Notification Indicator (ANENI): When inactive, indicates that the event monitor controls 1306 should be queued to the event queue 1116 for only the first list entry 1208 added to a subsidiary list. When active, indicates that the event monitor controls 1306 should be queued to the event queue for every list entry 1208 that is added.

    Event Monitor Queued Indicator (EMQI): Indicates whether the event monitor controls object 1306 is queued to the event queue 1116 associated with the user ID contained within the object.

    List Entry Key (LEK): Partially designates the primary subsidiary list.

    List Number (LN): Partially designates the subsidiary list.

    Key Type (KT): Indicates the key type (primary or secondary) in the event monitor controls 1306. When the key type is primary, the key is a (primary) list entry key and the event monitor controls 1306 are associated with a primary subsidiary list. When the key type is secondary, the key is a secondary list entry key and the event monitor controls 1306 are associated with a secondary subsidiary list.

    Secondary List Entry Key (SLEK): Partially designates the secondary subsidiary list.

    User Identifier (UID): Identifies the user.

    User Notification Control (UNC): A field per event monitor controls 1306 defined by the user.

    List Structure Object States

    List States

    A list 1106 is either in the empty or the not-empty state.

    Empty State: A list 1106 is in the empty state when the number of list entries 1208 on the list 1106 is less than or equal to the list empty notification threshold.

    Not-empty State: A list 1106 is in the not-empty state when the number of entries on the list 1106 is greater than the list not-empty notification threshold.

    When the empty and not-empty notification thresholds for the list 1106 are not equal and the number of entries on the list 1106 falls between the list empty notification threshold and the list not-empty notification threshold, inclusive of the latter, the state of the list 1106 is determined as follows:
  • 1. If an empty-to-not-empty list notification has not been generated since the list 1106 was created, the list 1106 is in the empty state.
  • 2. If an empty-to-not-empty list notification has been generated since the list 1106 was created, the state of the list 1106 depends on the last generated list notification; if the last generated list notification is an empty-to-not-empty transition, the state of the list 1106 is not empty, otherwise the list 1106 is empty.
    List State Transitions


  • A user may register interest in the state transitions of a list 1106 by means of the register list monitor command. A list 1106 may change either from the not-empty to the empty state or from the empty to the not-empty state.

    Empty to Not-empty List State Transition: A list 1106 that is in the empty state changes from the empty to the not-empty state when an entry is created on or moved to the list 1106 and the number of list entries 1208 on the list 1106 becomes one greater than the list not-empty notification threshold.

    Not-empty to Empty List State Transition: A list 1106 that is in the not empty state changes from the not-empty to the empty state when an entry is deleted from the list 1106 or moved to another list 1106 and the number of list entries 1208 on the list 1106 becomes equal to the list empty notification threshold.

    Key Range States

    A key range is either in the empty or the not-empty state. A user may request a notification of the initial state of a key range by means of the initial notification request type on the register list monitor command.

    Empty State: A key range is in the empty state when the number of list entries 1208 in the key range is less than or equal to the key range empty notification threshold.

    Not-empty State: A key range is in the not-empty state when the number of entries in the key range is greater than the key range not-empty notification threshold.

    When the empty and not-empty notification thresholds for the key range are not equal and the number of entries in the key range falls between the key range empty notification threshold and the key range not-empty notification threshold, inclusive of the latter, the state of the key range is determined as follows:
  • 1. If an empty-to-not-empty list notification has not been generated since the key range was initialized, the key range is in the empty state.
  • 2. If an empty-to-not-empty list notification has been generated since the key range was initialized, the state of the key range depends on the last generated list notification; if the last generated list notification is an empty-to-not-empty transition, the state of the key range is not empty, otherwise the key range is empty.
    Key Range State Transitions


  • A user may register interest in the state transitions of a key range by means of the register list monitor command. A key range may change either from the not-empty to the empty state or from the empty to the not-empty state.

    Empty to Not-empty Key Range State Transition: A key range that is in the empty state changes from the empty to the not-empty state when (1) an entry is created in the key range, (2) an entry is moved to the key range, or (3) key range initialization completes, and the number of list entries 1208 in the key range becomes greater than the key range not-empty notification threshold when the number had previously been less than or equal to the threshold.

    Not-empty to Empty Key Range State Transition: A key range that is in the not empty state changes from the not-empty to the empty state when an entry is (1) deleted from the key range, (2) moved to another list 1106, (3) moved to the same list 1106 with a new list entry key that is outside of the key range, or (4) key range initialization completes, and the number of list entries 1208 in the key range becomes less than or equal to the key range empty notification threshold when the number had previously been greater than the threshold.

    Subsidiary List States

    A subsidiary list is either in the empty or the not-empty state. A user may request to queue or withdraw the event monitor controls object 1306 to reflect the initial state of a subsidiary list by means of the initial notification request type on the register list monitor or register event monitors command.

    Empty State: A subsidiary list is in the empty state when there are no entries in the subsidiary list.

    Not-empty State: A subsidiary list is in the not-empty state when there are one or more entries in the subsidiary list.

    Subsidiary List State Transitions

    A user may register interest in the state transitions of a subsidiary list by means of the register list monitor or register event monitors command.

    A subsidiary list may change either from the not-empty to the empty state, from the empty to the not empty state, or from the not-empty to the not-empty state.

    Empty to Not-empty Subsidiary List State Transition: A subsidiary list changes from the empty to the not-empty state when the subsidiary list has no entries and an entry is created or moved to the subsidiary list.

    Not-empty to Empty Subsidiary List State Transition: A subsidiary list changes from the not-empty to the empty state when the subsidiary list has one entry and the entry is deleted or moved to another subsidiary list.

    Not-empty to Not-empty Subsidiary List State Transition: A subsidiary list changes from the not-empty to the not-empty state when (1) the subsidiary list is not empty, (2) an entry is created or moved to the subsidiary list, (3) the event monitor queued indicator is active and the aggressive not-empty notification indicator is active in the associated EMC.

    Event Queue States

    An event queue 1116 is either in the empty or the not-empty state. A user may request a notification of the initial state of an event queue 1116 by means of the initial notification request type on the register list monitor command.

    Empty State: An event queue 1116 is in the empty state when there is no event monitor controls object 1306 queued to the event queue 1116.

    Not-empty State: An event queue 1116 is in the not-empty state when there are one or more event monitor controls objects 1306 queued to the event queue 1116.

    Event Queue State Transitions

    A user may register interest in the state transitions of an event queue 1116 by means of the register list monitor command. An event queue 1116 may change either from the not-empty to the empty state or from the empty to the not-empty state.

    Empty to Not-empty Event Queue State Transition: An event queue 1116 changes from the empty to the not-empty state when the event queue 1116 has no queued object and an event monitor controls object 1306 is queued to the event queue 1116.

    Not-empty to Empty Event Queue State Transition: An event queue 1116 changes from the not-empty to the empty state when the event queue 1116 has one event monitor controls object 1306 queued and the object is dequeued, withdrawn, or deleted.

    Creating a List Structure

    When a list structure 902 is created, the list structure type determines the attributes of the created structure. The list structure type has indicators for each of the following: program list entry identifier indicator, counters, locks, data, adjunct, name, key, and secondary key.

    When the program list entry identifier indicator in the list structure type specified is inactive and allocation is successful, the list structure 902 uses list entry identifier values that are generated by the coupling facility.

    When the program list entry identifier indicator in the list structure type specified is active and allocation is successful, the list structure 902 uses list entry identifier values that ate program assigned.

    When the element count indicator in the list structure type specified is inactive and allocation is successful, the list controls 1202 for each list 1106 contain a list entry count and a list entry count limit. When the count indicator in the list structure type specified is active and allocation is successful, the list controls 1202 for each list 1106 contain a list element count and a list element count limit.

    When the lock indicator in the list structure type specified is active and allocation is successful, a lock table 1110 is created with a width as specified by the lock table entry characteristic and a length as specified by the lock table entry count.

    When the data indicator in the list structure type specified is active and allocation is successful, storage is allocated for the creation of list elements 1214. The size of the list elements 1214 is specified by the list element characteristic.

    When the adjunct indicator in the list structure type specified is active and allocation is successful, each list entry 1208 created in the structure has an adjunct list entry 1216 with a size of 64 bytes.

    When the name indicator in the list structure type specified is active and allocation is successful, each list entry 1208 created in the structure has a list entry name associated with it.

    When the key indicator in the list structure type specified is active and allocation is successful, every user identifier has primary event queue controls associated with it, each list entry 1208 created in the structure has a list entry key associated with it, and each list 1106 has a key range associated with it. The key range list entry key and maximum key range list entry key are both set to zero, and the key range is placed in the empty state.

    When the secondary key indicator in the list structure type specified is active and allocation is successful, every user identifier has secondary event queue controls associated with it and each list entry 1208 created in the structure has a secondary list entry key associated with it stored in the adjunct list entry 1216.

    When a list structure 902 is created, (1) the free space and free control space global controls are updated, (2) the appropriate created bit in the structure identifier vector is set to one, and (3) the list structure and list controls 1202 are initialized, including the update of the target structure size and target count objects.

    When a list structure 902 is created and the maximum structure size request operand 1010 is nonzero, the maximum structure size object is initialized to the largest storage size that the model can support given the structure size and is equal to or smaller than the maximum structure size request operand 1010 rounded up to the nearest integral multiple of the CF storage increment.

    When a list structure 902 is created, target structure size request operand 1010 is zero, and the maximum structure size request operand 1010 is zero, the maximum structure size object is set equal to the computed target structure size.

    Specifying a nonzero target structure size which is smaller than the marginal structure size or larger than the maximum structure size will cause the allocation to complete with an appropriate response code.

    Comparing List Authorities

    The list authorities are always compared when the write list controls command is executed. Otherwise, the comparison of list authorities is controlled by the list authority comparison type operand. When the value of the list authority comparison type is do not compare, the list authorities are not compared and list authority comparison is successful.

    When the value of the list authority comparison type is compare for being equal or compare for being less than or equal or when a write list controls command is executed, the CLAU operand is compared with the value of the list authority control in the specified list 1106.

    The specified list 1106 is designated by the LN operand 1010 in the MCB 1002. The only exception is that when the write and move list entry command results in the creation of a list entry 1208, the specified list 1106 is designated by the TLN operand 1010 in the MCB 1002.

    When the value of the list authority comparison type is compare for being equal and they are equal, the list authority comparison succeeds, and the command continues.

    When the value of the list authority comparison type is compare for being less than or equal and the list authority control is less than or equal to the CLAU operand, the list authority comparison succeeds and the command continues.

    When the list authority comparison fails, command execution is completed with an appropriate response code.

    Replacing List Authorities

    The list authority control may be replaced when the write list controls command is executed. Otherwise, the replacement of list authorities is controlled by the list authority replacement type and list authority comparison type operands. When the value of the list authority replacement type is active, the value of the LAU operand is stored in the list authority control provided one of the following conditions exists:

    The command is write list controls and list authority comparison is successful, and (1) The value of the LAUCT operand is do not compare, or (2) The value of the LAUCT operand is compare for being equal or compare for being less than or equal and list authority comparison is successful.

    List authority comparison always occurs before any list objects are updated.

    Comparing Keys

    When the key comparison type is active, the list entry key object is compared with the list entry key request operand 1010 and optionally the maximum list entry key operand. The key request type operand specifies how the keys are compared.

    When the secondary key comparison type is active, the secondary list entry key object is compared with the secondary list entry key request operand 1010 and optionally the maximum secondary list entry key operand. The secondary key request type operand specifies how the keys are compared.

    When both the key comparison type and the secondary key comparison type are active, both key comparisons are performed and both must succeed in order for the key comparison to be successful.

    For multiple list entry commands, the key comparison is on an entry basis, the key is compared for the entry and the delete, read, or move for the entry occurs if the key comparison is successful for the entry. When the comparison is successful, the list entry 1208 is selectable by a multiple list entry command. When the comparison is unsuccessful, the list entry 1208 is not selectable.

    Initializing a Key Range

    A key range is initialized when a write list controls command is executed and the key range list entry key and key range maximum list entry key are updated or when a list 1106 is created and the list 1106 is keyed. A key range is initialized by calculating the number of list entries 1208 in the key range, comparing the count to the key range threshold values, and setting the key range state to either the empty state or the not-empty state. Initialization of the key range can be continued or completed by either continued executions of the write list controls command with bit 7 of the LCT active or by continued execution of the register list monitor command with a monitor request type of key range monitor. If key range initialization is not complete, the WLC or RLM commands complete with appropriate response codes.

    If key range initialization is not complete, and a WLC command is executed with bit 7 of the LCT inactive or a RLM command is executed and the monitor request type is not key range monitor, then the WLC and RLM commands are executed independently from key range initialization.

    If the WLC command is executed with bit 7 of the LCT active, key range initialization is in progress, and the specified key range list entry key or key range maximum list entry key are different from the values associated with the key range, initialization of the prior key range is stopped and initialization of the new key range is started.

    Comparing Global Lock Managers

    Generally, a global lock manager comparison is performed before a lock table entry 1112 is written, and a global lock manager comparison may be performed before the next nonzero lock table entry 1112 is read, or before a list entry 1208 is created, replaced, read, moved, or deleted, or before an adjunct lock entry is updated by an adjunct locking operation.

    The global lock manager object is compared with the comparative global lock manager specified. When they match, the global lock manager comparison succeeds. When they do not match, the global lock manager comparison fails.

    Except for the reset lock managers command and the read next lock table entry command, when a lock table write is to be performed, when a list entry creation, replacement, read, movement, or deletion is to be performed, or when an adjunct lock entry is to be updated by an adjunct locking operation, if the global lock manager comparison is requested and succeeds, the command continues; if the global lock manager comparison is requested and fails, command execution is completed with an appropriate response code.

    For the reset lock managers command with the unlock type operand set to either B'10' or B'11', if the global lock manager comparison succeeds, the command continues. If the global lock manager comparison fails and if the report mismatch type operand is B'0', then a lock manager mismatch response code is returned. If the global lock manager comparison fails and if the report mismatch type operand is B'1', then the current request block is skipped and the command continues to process the next request block.

    For the reset lock managers command with the unlock type operand set to B'01', if the global lock manager comparison succeeds and the report mismatch type operand is B'1', or both global and local lock manager comparisons are successful, the command continues. If the global lock manager comparison or local lock manager comparison fails, and the report mismatch type operand is B'0', then a lock manager mismatch response code is returned. If the global lock manager comparison fails and if the report mismatch type operand is B'1', then the current request block is skipped and the command continues to process the next request block.

    For the read next lock table entry command with the lock request type operand set to compare global lock managers, if the global lock manager comparison succeeds on a nonzero lock table entry 1112, the entry is returned; if the global lock manager comparison fails, the entry is skipped and the scan of the lock table 1110 continues.

    For the read next lock table entry command with the lock request type operand set to compare global lock or local lock managers, if either global lock manager or local lock manager comparison succeeds on a nonzero lock table entry 1112, the entry is returned; if neither comparison succeeds, the entry is skipped and the scan of the lock table 1110 continues.

    Comparing Local Lock Managers

    Generally, local lock manager comparison may occur before a lock table entry 1112 is written, before an adjunct lock entry is updated by an adjunct locking operation, before the next nonzero lock table entry 1112 is read, or before a list entry 1208 is created, replaced, read, moved, or deleted.

    Local lock manager comparison is also performed as part of the global lock manager replacement process, and may also be performed as part of the local lock manager replacement process.

    When a local lock manager object exists and a global lock manager replacement is requested, the local lock manager object value is ANDed with a mask of all ones except for the local lock bit corresponding to the user identifier specified. This ANDed value is then compared with zero. When they match, the local lock manager comparison succeeds. When they do not match, the local lock manager comparison fails.

    When a local lock manager object exists and a local lock manager comparison is requested, or when a local lock manager object exists and a local lock manager replacement that requires the local lock manager comparison to be performed, is requested, the local lock bit corresponding to the user identifier specified is compared with the local lock bit value specified. When (1) they match and local lock manager comparison is requested or (2) they do not match and local lock manager replacement is requested, the local lock manager comparison succeeds. When (1) they do not match and local lock manager comparison is requested or (2) they match and local lock manager replacement is requested, the local lock manager comparison fails.

    Except for the reset lock managers command and the read next lock table entry command, when a lock table write is to be performed, when a list entry creation, replacement, read, movement, or deletion is to be performed, or when an adjunct lock entry is to be updated by an adjunct locking operation, if the local lock manager comparison is requested and succeeds, the command continues; if the local lock manager comparison is requested and fails, command execution is completed with an appropriate response code.

    For the reset lock managers command, local lock manager comparison may be performed when the unlock type operand is B'01'. In this case, if the global lock manager comparison succeeds and the report mismatch type operand is B'1', or both global and local lock manager comparisons are successful, the command continues. If the global lock manager comparison or local lock manager comparison fails, and the report mismatch type operand is B'0', then a lock manager mismatch response code is returned.

    For the read next lock table entry command with the lock request type operand set to compare local lock managers, if the local lock manager comparison succeeds on a nonzero lock table entry 1112, the entry is returned; if the local lock manager comparison fails, the entry is skipped and the scan of the lock table 1110 continues.

    For the read next lock table entry command with the lock request type operand set to compare global lock or local lock managers, if either global lock manager or local lock manager comparison succeeds on a nonzero lock table entry 1112, the entry is returned; if neither comparison succeeds, the entry is skipped and the scan of the lock table 1110 continues.

    Locating a List Entry or List Entry Position

    A list entry 1208 is located by unkeyed position. when an entry locator type of locate by unkeyed position is specified or an unkeyed list entry 1208 is created or moved; that is, the designated position or designated target position is specified by means of a list number and a direction.

    A list entry 1208 is located by keyed position when the list entries 1208 are keyed and an entry locator type of locate by keyed position is specified or a keyed list entry 1208 is created or moved; that is, the designated position or designated target position is specified by means of a list number, direction, and a list entry key.

    A list entry 1208 is located by list entry identifier when an entry locator type of locate by list entry identifier is specified; that is, the designated position is the position of the identified list entry 1208.

    A list entry 1208 is located by list entry name when the list entries 1208 are named and an entry locator type of locate by list entry name is specified; that is, the designated position is the position of the named list entry 1208.

    A list entry 1208 is located by list cursor position when an entry locator type of locate by list cursor position is specified; that is the designated position is the position of the identified list entry 1208 as specified by the list cursor.

    A list entry 1208 has a position relative to the designated position or the designated target position. When a list entry 1208 is created, moved, or deleted, the relative positions of the successive list entries 1208 are changed. In these cases, the first entry is the designated list entry 1208 and successive entries are determined by the direction specified.

    Regardless of how a list entry 1208 is located, when a left-to-right direction is specified, the last entry is the rightmost entry in the list 1106, and when a right-to-left direction is specified, the last entry is the leftmost entry in the list 1106.

    Designated List Entry

    The designated list entry 1208 is (1) the first entry relative to the designated position before an entry is deleted, moved, read, replaced, replaced and moved, moved and read, or read and deleted, or is (2) the first entry relative to the designated target position after an entry is created.

    When a list entry 1208 is located by list entry identifier, the designated list entry 1208 is the identified list entry 1208.

    When a list entry 1208 is located by list entry name, the designated list entry 1208 is the named list entry 1208.

    When a list entry 1208 is located by list cursor position, the designated list entry 1208 is the identified list entry 1208 as specified by the list cursor.

    When a list entry 1208 is located by unkeyed position and a left-to-right direction is specified, the designated list entry 1208 is the leftmost entry in the list 1106. When a list entry 1208 is located by unkeyed position and a right-to-left direction is specified, the designated list entry 1208 is the rightmost entry in the list 1106.

    When (1) a list entry 1208 is located by keyed position the entry locator key type is primary, and the KRT does not indicate key range, (2) entry deletion, read, replacement, or movement is requested, (3) a list entry 1208 with an equal key, a less than or equal key, or a greater than or equal key, exists on the list 1106, depending on the key request type, and (4) a left-to-right direction is specified, then the designated list entry 1208 is the leftmost entry with a key equal, with the largest key less than or equal, or with the smallest key greater than or equal to the specified list entry key request operand 1010.
    • When (1) a list entry 1208 is located by keyed position, the entry locator key type is primary, and the KRT does not indicate key range, (2) entry deletion, read, replacement, or movement is requested, (3) a list entry 1208 with an equal key, a less than or equal key, or a greater than or equal key, exists on the list 1106, depending on the key request type, and (4) a right-to-left direction is specified, then the designated list entry 1208 is the rightmost entry with a key equal, with the largest key less than or equal, or with the smallest key greater than or equal to the specified list entry key request operand 1010.
    • When (1) a list entry 1208 is located by keyed position, the entry locator key type is secondary, and the SKRT does not indicate key range, (2) entry deletion, read, replacement, or movement is requested, (3) a list entry 1208 with an equal secondary key, a less than or equal secondary key, or a greater than or equal secondary key, exists on the list 1106, depending on the secondary key request type, and (4) a left-to-right direction is specified, then the designated list entry 1208 is the leftmost entry with a secondary key equal, with the largest secondary key less than or equal, or with the smallest secondary key greater than or equal to the specified secondary list entry key request operand 1010.


  • When (1) a list entry 1208 is located by keyed position, the entry locator key type is secondary, and the SKRT does not indicate key range, (2) entry deletion, read, replacement, or movement is requested, (3) a list entry 1208 with an equal secondary key, a less than or equal secondary key, or a greater than or equal secondary key, exists on the list 1106, depending on the secondary key request type, and (4) a right-to-left direction is specified, then the designated list entry 1208 is the rightmost entry with a secondary key equal, with the largest secondary key less than or equal, or with the smallest secondary key greater than or equal to the specified secondary list entry key request operand 1010.

    When (1) a list entry 1208 is located by keyed position, the entry locator key type is primary, and the KRT indicates key range, (2) entry deletion, read, replacement, or movement is requested, (3) a list entry 1208 with a key within range exists on the list 1106, and (4) a left-to-right direction is specified, then the designated list entry 1208 is the leftmost entry with a key value greater than or equal to the specified list entry key request operand 1010.

    When (1) a list entry 1208 is located by keyed position, the entry locator key type is primary, and the KRT indicates key range, (2) entry deletion, read, replacement, or movement is requested, (3) a list entry 1208 with a key within range exists on the list 1106, and (4) a right-to-left direction is specified, then the designated list entry 1208 is the rightmost entry with a key value less than or equal to the specified maximum list entry key request operand 1010.

    When (1) a list entry 1208 is located by keyed position, the entry locator key type is secondary, and the SKRT indicates key range, (2) entry deletion, read, replacement, or movement is requested, (3) a list entry 1208 with a secondary key within range exists on the list 1106, and (4) a left-to-right direction is specified, then the designated list entry 1208 is the leftmost entry with a secondary key value greater than or equal to the specified secondary list entry key request operand 1010.

    When (1) a list entry 1208 is located by keyed position, the entry locator key type is secondary, and the SKRT indicates key range, (2) entry deletion, read, replacement, or movement is requested, (3) a list entry 1208 with a secondary key within range exists on the list 1106, and (4) a right-to-left direction is specified, then the designated list entry 1208 is the rightmost entry with a key value less than or equal to the specified maximum secondary list entry key request operand 1010.

    Designated Position

    The designated position is the position of the designated list entry 1208 before an entry is moved, deleted, read, replaced, replaced and moved, moved and read, or read and deleted.

    The designated position is specified (1) by an unkeyed position, (2) by a keyed position, (3) by a list entry identifier, (4) by a list entry name, or (5) by a list cursor, depending on the entry locator type and the entry locator key type specified and the type of structure allocated.

    When a list entry 1208 is located by list entry identifier or by list entry name, the designated position exists when the list entry 1208 exists.

    When a list entry 1208 is located by list cursor, the designated position exists when the identified list entry 1208 exists as specified by the list cursor.

    When a list entry 1208 is located by unkeyed position, the designated position exists when the list 1106 exists and there is at least one entry on the list 1106.

    When a list entry 1208 is located by keyed position and entry creation is not requested, the designated position exists when a list entry 1208 in the list 1106 has a key that is equal, greater than or equal, or less than or equal to the specified list entry key in the list 1106, depending on the key request type.

    When a list entry 1208 is located by keyed position, the entry locator key type is primary, and entry creation is not requested, the designated position exists when a list entry 1208 in the list 1106 has a key that is equal to, greater than or equal to, less than or equal to, or within the range specified by the list entry key and the maximum list entry operands, depending on the key request type.

    When a list entry 1208 is located by keyed position, the entry locator key type is secondary, and entry creation is not requested, the designated position exists when a list entry 1208 in the list 1106 has a secondary key that is equal to, greater than or equal to, less than or equal to, or within the range specified by the secondary list entry key and the maximum secondary list entry operands, depending on the secondary key request type.

    When the designated position does not exist, an appropriate response code is returned.

    Designated Target Position

    The designated target position is the position of the designated list entry 1208 after an entry is created or moved.

    The designated target position is specified (1) by an unkeyed position or (2) by a keyed position, depending on the type of structure allocated.

    When a list entry 1208 is located by unkeyed position and a left-to-right direction is specified, then the designated target position is the leftmost position in the list 1106. When a list entry 1208 is located by unkeyed position and a right-to-left direction is specified, then the designated target position is the rightmost position in the list 1106.

    When (1) a list entry 1208 is located by keyed position, (2) entry creation or movement is requested, (3) a list entry 1208 with an equal key of the specified entry locator key type exists on the list 1106, (4) a left-to-right direction is specified, then the designated target position is the position of the leftmost entry with the same key.

    When (1) a list entry 1208 is located by keyed position, (2) entry creation or movement is requested, (3) a list entry 1208 with an equal key of the specified entry locator key type exists on the list 1106, (4) a right-to-left direction is specified, then the designated target position is the position of the rightmost entry with the same key.

    When (1) a list entry 1208 is located by keyed position, (2) entry creation or movement is requested, and (3) all entries on the list 1106 have a key of the specified entry locator key type greater than the specified key, the designated target position is the leftmost position in the list 1106.

    When (1) a list entry 1208 is located by keyed position, (2) entry creation or movement is requested, (3) at least one list entry 1208 on the list 1106 has a key of the specified entry locator key type less than the specified key, and (4) there is no list entry 1208 in the list 1106 that matches the specified key, then the designated target position is the first position after the rightmost entry with a key less than the specified list entry key in the list 1106.

    When a list entry 1208 is located by keyed position and entry creation or movement is requested, the designated target position exists when the list 1106 exists.

    Comparing List Numbers

    When the list number comparison type is active and a list entry 1208 is not created, a list number comparison is requested.

    When list number comparison is requested, the list number object is compared with the list number specified. If they do not match, the list number comparison fails, command execution is completed with an appropriate response code or command execution continues by skipping the current list entry 1208, depending on the command.

    Comparing Counts

    There are four sets of counts that are compared, depending on the process requested: the list set entry counts, the list set element counts, the event monitor controls counts, and the list entry counts or list element counts, depending on the element count indicator.

    Comparing Event Monitor Controls Counts

    The maximum event monitor controls count object is compared with the event monitor controls count object whenever an event monitor is registered and event monitor controls creation is requested. The event monitor controls object space is full when the maximum event monitor controls object equals the event monitor controls object.

    Comparing List Element Counts

    The list element count limit object is compared with the list element count object whenever a list entry 1208 is written or moved, the suppress list limit comparison control is inactive, and the element count indicator in the list structure type is active. If the sum of the list element count and the number of additional list elements 1214 required exceeds the list element count limit, the list 1106 is full. When the list 1106 is full and a write or move operation is requested, an appropriate response code is returned.

    The list element count limit or list entry count limit is updated on a write list controls command, depending on the list control type.

    Comparing List Entry Counts

    The list entry count limit object is compared with the list entry count object whenever a list entry 1208 is created or moved, the suppress list limit comparison control is inactive, and the element count indicator in the list structure type is inactive. A list 1106 is full when the number of list entries 1208 created matches or exceeds the list entry count limit. When the list 1106 is full and a create or move operation is requested, an appropriate response code, depending on the command, is returned.

    The record global lock manager command is an exception to list entry count limit comparison.

    Comparing List Set Element Counts

    The maximum list set element count object is compared with the list set element count object whenever a data list entry 1212 is written. If the sum of the list set element count and the number of additional list elements 1214 required exceeds the maximum list set element count, the list set 1104 is full. When the list set 1104 is full, and list entry creation or replacement, or retry data block creation is requested, an appropriate response code is returned.

    Comparing List Set Entry Counts

    The maximum list set entry count object is compared with the list set entry count object whenever a list entry 1208 is created. A list set 1104 is full when the number of list entries 1208 created and not deleted matches the maximum list set entry count. When a list set 1104 is full and list entry creation is requested, an appropriate response code, depending on the command, is returned.

    Updating Counts

    There are three types of counts that are updated, depending on the process requested: the list s