Use the ABL ASSIGN statement
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
When you want to make changes to several indexed components
in an ABL procedure, use the ASSIGN statement to define
these new values. This method allows you to change several values
with minimum I/O processing. Otherwise, the AVM re-indexes records
at the end of each statement that changes the value of an index
component.
The following code demonstrates how you can change two index
values with the ASSIGN statement:
r-sgn2.p
|
This procedure changes the order number and line number of an
order-line record. (It copies an order-line from one order to another.)
It sets the new values into variables and modifies the record with
a single ASSIGN statement that contains two assignment
phrases in the form field=expression.
So both fields are changed within a single statement. Because order-num
and line-num are used jointly in one index, this method avoids having
the indexing done until both values change.