![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
Returns the next table occurrence that satisfies the selection criteria following a call to FORALLA. (C)CALL FORALLB(table)
This is a string specifying the name of the table to retrieve from. It is syntax C (fixed-length character string) and length 16.
• FORALLB continues to retrieve occurrences based on the selection and ordering criteria specified in the call to FORALLA. After one initial call to FORALLA, FORALLB can be called repeatedly to retrieve multiple occurrences from a table.
• To use FORALLB to retrieve all the occurrences in the table that match the selection criteria specified in a preceding call to FORALLA, call FORALLB within a loop created by an UNTIL TABLEEND statement. FORALLB continues to retrieve occurrences until there are no more occurrences that satisfy the criteria. At that point, FORALLB raises the TABLEEND exception and the loop exits.
• There are a maximum of 16 tables that can be actively accessed with FORALLB per transaction. When you are finished accessing a table, you should call FORALLE to indicate that you are finished and to free up a slot for another table to be accessed.TIBCO Object Service Broker Programming in Rules for information on the rules language.
There are no more occurrences to process that satisfy the selection criteria.Using the following rule, QUERY_EMPS, users can construct a query against the EMPLOYEE table. The rule retrieves employee names based on the selection criteria associated with one field or with a combination of two fields and prints them to the message log. Users can execute the rule directly, or the rule could be part of a larger application in which input values are entered via a screen.QUERY_EMPS pads input data to appropriate lengths, constructs a FORALLA statement using the data from one or two fields, and then uses FORALLB, FORALLE, and MSGLOG to retrieve and display the names of all employees meeting the selection criteria in the FORALLA statement.
To find which employees working for manager number 79912 have a salary of more than $700.00, the following input values are supplied:
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |