Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Tools : PROCESS_TABLE

PROCESS_TABLE
Provides specific processing for every occurrence in a table that is selected, ordered, or both selected and ordered. (C)
Invocation
CALL PROCESS_TABLE(tablespec, selection, ordering, processrule)
 
The name of the rule to be called for each occurrence in the table that satisfies the selection/ordering criteria.
Usage Notes
Calls to PROCESS_TABLE can be nested (that is, processrule can call PROCESS_TABLE on a different table).
The syntax for selection is <field name><relational operator><expression>. For valid expressions, refer to the TIBCO Object Service Broker Programming in Rules manual.
The syntax for ordering is direction (that is, ascending or descending) and field name.
processrule must not be a function and it must not have arguments.
processrule and its descendant rules must not reference the following local variables: TABLE, SELECTION, ORDERING, PROCESSRULE, and GIVENTABLENAME.

Exceptions
 
Raised if invalid tablespec, selection, or ordering is specified.
Example
In the following examples, the process rule changes the salary of selected employees.
The first example shows the rule to be processed:

 
RULE EDITOR ===> SCROLL: P
PROC_EMPLOYEE_R;
_
_ ---------------------------------------------------------------------------
 _ ---------------------------------------------------------------------------
_ EMPLOYEE_DEPT.SALARY = EMPLOYEE_DEPT.SALARY * 1.05; | 1
_ REPLACE EMPLOYEE_DEPT(10); | 2
_ ---------------------------------------------------------------------------

 
The second example calls in PROCESS_TABLE:

 
RULE EDITOR ===> SCROLL: P
PROC_EMPLOYEE(SELECTION);
_
_ ---------------------------------------------------------------------------
_ ------------------------------------------------------------+--------------
_ CALL PROCESS_TABLE('EMPLOYEE_DEPT(10)', SELECTION, '', | 1
_ 'PROC_EMPLOYEE_R'); |
_ ---------------------------------------------------------------------------

 
Typing PROC_EMPLOYEE('SALARY < 500.00') at the EX Execute Rule option on the workbench increases the salaries of all the employees whose salary is less than $500.00 in the table EMPLOYEE_DEPT(10).
Typing PROC_EMPLOYEE('MGR#=79912') at the EX Execute Rule option on the workbench increases the salaries of all the employees managed by MGR# 79912 in the table EMPLOYEE_DEPT(10).
Typing PROC_EMPLOYEE('EMP_LNAME LIKE "F*" & MGR# = 80354') at the EX Execute Rule option on the workbench, increases the salaries of all employees whose last name starts with F and who are managed by MGR# 80354 in the table EMPLOYEE_DEPT(10).
 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved