The general syntax is:
>extract field-name = expression
The "field-name" can be any field from a database, a self-describing file, or a Define command. An "expression" is any numeric value, or field name, or an arithmetic combination of the two. For example,
>define DoubleField,1,4,double {define a new field with required storage format} >extract DoubleField = PackedField + 10 {assign it values from existing fields} >define DisplayField,1,6,display {define human-readable target} >extract DisplayField = I2Field {convert binary field to Display}
If you want to update a field with the value of another field in the same dataset, use the Update command before the Extract command.
>update {MPE only} >extract TotalCost = UnitCost * SalesQty
This is particularly handy for Suprlink users when two files store the key field in different formats. For example, a Z6 display field to store CustomerNumber in one file, and a J2 integer field to store CustNo in another file.