Complex Wait BCT

The COMPLEX WAIT BCT suspends the execution of a program. The COMPLEX WAIT BCT allows a program to act on numerous possible asynchronous events or to be suspended pending receipt of such an event.

The COMPLEX WAIT BCT builds entries in the COMPLEX WAIT table for each program on which it acts. The table is organized as follows:

  • For each program there is a program entry with
    • A flag indicating that it is in a COMPLEX WAIT
    • The Run Log (RLOG) nuimber of the program
    • The value of the P4 ACON field

A program with a RLOG number of 0 concludes the “in use” section of the table.

  • Following each program entry is a series of event entries that contain:
    • The event type
    • a FIB address (0 if none)
    • a subport index (0 if none)
    • The position of the event in the original event list

The size of the COMPLEX WAIT table varies from 0 to 9999 elements and is set by either a LIMIT WAITTABLE <number of entries> record in the MCP configuration file, or it is calculated as 10 times the maximum number of mix entries.

If a program executes a COMPLEX WAIT BCT when there are insufficient entries available in the COMPLEX WAIT table, the program is suspended until space is available. If sufficient space will never be available, the BCT is invalid and the program is terminated. The system operator can cause an earlier reexecution of the BCT (if space is available) by giving the program an OK keyboard command.

The format of the BCT is as follows:

     BCT   0994
     BUN
     P1.   CNST 2 UN  =  xx   (number of parameters in list)
     P2.   ACON               (address of parameter list)
     P3.   ACON               (address of 2 UN using field; 0 if none)
     P4.   ACON               (address of 2 UN giving field; 0 if none)
     

Parameter P1

This parameter contains the number of parameters in the parameter list (00 to 99).

Parameter P2

This parameter contains the address of the list of parameters, each of which is defined as follows:

 CNST 4 UN =XXXX    /Event Type
 ACON               /Depends on event type  
 ACON               /Depends on event type
 

These three fields are repeated for each parameter supplied and must be contiguous. Table 2-8 lists the event types:

Event Type Meaning
0 Time (DOZE)
1 ODT input present
2 Output Event (Port File)
3* Input Event (Port File, DCP, RJE)
4 Change Event (Port File, DCP)
5 Ready Event (Port File)
6 STOQ input event
7 STOQ output event
8 CRCR input event (receive)
9 crcr[CRCR output event (send)
10 MCPMSG Event
11 Output-w-write
12 Input-w-read
13 Job Manager (JM) input event
14 Job Manager (JM) output event

* Input event on the RJE SPO tank is implemented. This event is true whenever the key in low memory is greater than zero.

For a complete description of COMPLEX WAIT event types, refer to the V Series BNA Installation and Operations Guide.

Event types have the following effects:

  • If the event type is 0, the first ACON contains the address of a 5 UN time field whose value indicates a time in seconds, and the second ACON contains a value of 0.
  • If the event type is 1, both ACONs contain values of 0.
  • If event type is 2, 3, 4, or 5, the first ACON contains the address of a FIB and, if the file is a port file, the second ACON contains the address of a 4 UN subport index. If the subport index is zero, this is a port event.
    Note: An output event is invalid as a port event.
  • If the event type is 6 or 7, the first ACON contains the address of the base of the stoque parameter block, and the second ACON contains a value of 0.
  • If the event type is 8 or 9, the first ACON contains the address of a 6 UA field that contains the CRCR partner program name. The second ACON contains a value of 0.

Parameter P3

When the COMPLEX WAIT BCT is executed, each event is tested to see if it has already occurred. The order in which the events are tested is determined by the value to which P3 points.

  • If P3 contains a value of 0, the events are tested in the order they are specified in the parameter list.
  • Otherwise, the first event tested is the one that occupies the nth position in the parameter list (positions are 1-relative), where n is the value of the Using field pointed to by P3.

In either case, all events are tested.

Parameter P4

When the program is reinstated after executing a COMPLEX WAIT BCT, the program has the option of requesting an indication of which event has happened.

  • If P4 points to a value of 0, no indication is given.
  • Otherwise, the position of the event that occurred is placed in the Giving field pointed to by P4. The position is the 1-relative position of the event in the original event list.
programming_interfaces/complex_wait.txt · Last modified: 2011/07/25 10:52 by scott
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki