Update Command [UP]. Robelle Suprtool 4.6.01, STExport, Suprlink
Reklama
Reklama
Update Command [UP]
Update one or more noncritical fields in an Eloquence dataset.
UPDATE [ CIUPDATE ]
UPDATE [ CIUPDATE ]
Specify the fields to be updated and their new values with the Extract command. The
Update command must be specified after the Chain or Get command, but before the
Extract command(s). You can update part of an Eloquence field by defining the part you are interested in and then using the defined field name in the Extract command.
The Update command can change values in critical fields (Eloquence search or sort fields). To update critical fields, you must specify the Ciupdate option, and
CIUPDATE must be On or Allowed in the database.
Example
This example selects all inventory items with a unit-cost less than $10.00 and increases the unit-cost by five percent.
>get d-inventory {input dataset}
>item unit-cost,decimal,2 {implied decimal places}
>if unit-cost < 10.00 {selection criteria}
>update {Update must come before Extract}
>extract unit-cost = & {calculate the new …}
unit-cost * 1.05 {… unit-cost value}
>xeq
This next example selects all inventory items with a part number of 12345677 and changes it to 12345678.
>get d-inventory {input dataset}
>if product-no = 12345677 {selection criteria}
>update ciupdate
>extract product-no = 12345678 {new unit-cost value}
>xeq
You can set CIUPDATE by using the DBUTIL Utility. To set CIUPDATE on just run Dbutil and use the Set command:
:run dbutil.pub.sys
>>set dbname ciupdate=on
>>exit
Notes
The only commands that can be combined with Update are selection commands
(e.g., the If command). The following commands are not allowed: Delete, Duplicate,
Key, List, Output, Put, Sort, or Total. You cannot update critical fields in master datasets. Update does not work with disc files or SQL databases.
If you are updating a packed or display field, remember that Suprtool uses unsigned values for non-negative numbers unless you add a leading plus sign to the number.
See "Packed and Display Constants" on page 86 for more details.
Suprtool 4.6 for HP-UX: Suprtool Suprtool Commands
• 177
Stiahnuť
Reklama