MOVE_OBJECT

Script Function: Moves an object to a folder.

Syntax

MOVE_OBJECT (Object Name, Destination Folder)

Syntax

Description/Format

Object Name

The name of the object.
Format: script literal or script variable

Destination Folder

The path of the folder in which the object should be moved.
Format: script literal or script variable


Return codes

"0" - The object was successfully moved.
"20645" - This object does not exist.
"20657" - The target folder does not exist.

It is irrelevant in which folder the object that should be moved is stored because it will be retrieved automatically. Existing object links are ignored and will not be moved.

Important!

  • A runtime error will occur if you use an :ON_ERROR statement with the ABEND parameter, but the object or the folder does not exist. If the folder does not exist, the object remains in its original folder. For more information, see :ON_ERROR.
  • You need write access (W) to the object and the target folder, as a runtime error will occur otherwise. For more information, see Granting Automation Engine Authorizations.

Note: The script statement causes all open transactions of the script to be written to the AE database. For more information, see Script Processing.

Example

The following example moves the object VIENNA to the sub-folder OBJECTS of the folder TIME_ZONES.

:ON_ERROR ABEND
:
SET &RET# = MOVE_OBJECT ("VIENNA","TIME_ZONES/OBJECTS")

See also: