HP 3000 Manuals

MODIFY ITEM [ HP Transact Reference Manual ] MPE/iX 5.0 Documentation


HP Transact Reference Manual

MODIFY ITEM 

Modifies the value of a data item in the data register.

Syntax 

{MODIFY ITEM} item_name [(subscripts)] [new_value]
{MIT        }
Parameters 

item_name        The name of the data item in the data register to
                 modify.

subscripts       A list of numerical values of the form val1,
                 val2,...valn used to select a particular element in an
                 array.  If this parameter is omitted and the item being
                 modified is an array, only the first element in the
                 array will be modified.  If this parameter is specified
                 and the item is not an array, an error message is
                 displayed and the item is left unchanged.

new_value        A literal value to place in the data register at the
                 specified item location.  The new_value parameter can be
                 enclosed in quotes if embedded, preceding or trailing
                 blanks are desired.  If this parameter is omitted, the
                 current value of the item is displayed; you can either
                 enter a new value or press Return to leave the item
                 unchanged.

Discussion 

This command allows you to change the value of an item in the data
register.  If the new value cannot fit into the storage length of the
item an error message is displayed.  This truncation can lead to
incorrect values in the data register, so be careful when you modify
items.  The main data types to be concerned with are X, U, 9, Z, and P.

Examples 

The first example shows how to change item1.  The second example shows
how to use embedded blanks within the new_value parameter.

     TRANDEBUG> MODIFY ITEM item1 ABCD 
     TRANDEBUG> DISPLAY ITEM item1 

     ITEM1          :   ABCD

     TRANDEBUG> MODIFY ITEM item1 "ABCD EFGH" 
     TRANDEBUG> DISPLAY ITEM item1 

     ITEM1          :   ABCD EFGH



MPE/iX 5.0 Documentation