TRANSFER Reference Manual

ALTER-ITEM-NAME
TISERV UOW Descriptions
069139, Update 1 to 40969 Tandem Computers Incorporated 2–117
ALTER-ITEM-NAME Operation
ALTER-ITEM-NAME assigns a name to an instance of an item in a specified folder,
alters an existing name for that item or removes a name from a named item. This
UOW can only be issued within a TMF transaction. If the item is in a private folder or
a bulletin board, the correspondent must be the session that originally saved the
instance of the item in the folder.
Your process can reference the item either by its item ID or an item handle. The item
must be stored in the folder indicated by FOLDER-NAME and the folder must be
owned by the current correspondent; otherwise, the TRANSFER delivery system
returns E-FLD-NOT-FOUND.
If the SIMPLE-ITEM-NAME field contains a nonblank name, that name must be
unique within the folder specified by FOLDER-NAME; otherwise, E-DUP-ITEM-
NAME is returned. If this field contains an item name that is illegal, E-INVALID-
ITEM-NAME is returned. If this field contains a value of spaces, this indicates that the
item is unnamed; this value is used to remove an existing name from an item.
To save an item in a folder and then assign a name to that item, in a combined
operation, issue SAVE-ITEM-UOW followed by the ALTER-ITEM-NAME UOW
within the same IPC. If you wish to ensure that the item is only saved if it is
successfully named, set the AUTO-UNSAVE subfield to Y. Then, if the naming
operation fails, the TRANSFER delivery system automatically removes the item from
the folder (using the operations noted in the discussion of the UNSAVE-ITEM UOW).
In this case, RETN-CODE contains the primary error number and RETN-CODE-
DETAIL contains either W-ITEM-AUTO-UNSAVE (if the unsave operation succeeds)
or an error number related to the unsave operation (if that operation fails).
Note If an error occurs before the TRANSFER delivery system can determine if the current item is named or
not, the TRANSFER delivery system assumes (as a precaution) that the item is named. In this case,
even if AUTO-UNSAVE is set to Y, the item is not automatically unsaved. As long as the instance of the
item in the folder is currently unnamed, the AUTO-UNSAVE flag setting is effective. However, the
TRANSFER delivery system ignores this flag if the item is currently assigned a name.