The SUMMARIZE EACH statement is iterative and it provides a TARGETING clause that lets a new occurrence of repeating group views be populated each time the statement executes. However, unlike the READ EACH statement, SUMMARIZE EACH has the ability to populate a repeating group view's occurrences directly, by using its attributes in the PLACING clause.
In the following example, the PLACING . . . INTO attributes belong to a repeating group.
SUMMARIZE EACH GROUP OF employee WITH THE SAME employee job_grade TARGETING repeating_group_local FROM THE BEGINNING UNTIL FULL PLACING employee job_grade INTO local employee job_grade PLACING GROUP count(OCCURRENCES) INTO local ief_supplied count
In this example, the designated local views belong to the implicitly indexed repeating group view, repeating_group_local.
Note: Attributes of repeating group views referenced in the TARGETING clause may not be used in the WHERE clause. This is because the targeted occurrence of the repeating group is not yet available when the WHERE clause is executed. This restriction also applies to READ EACH.
The following example shows attribute view definitions associated with implicit:
LOCALS: Group View repeating_group_local (4, implicit) Work View local ief_supplied count Work View local employee job_grade ENTITY ACTIONS: Entity View employee number job_grade
|
Copyright © 2014 CA.
All rights reserved.
|
|