Move a BTS data-container (and its contents) from one activity
to another.
MOVE CONTAINER (BTS)
>>-MOVE--CONTAINER(data-value)--AS(data-value)------------------>
>--+--------------------------+--+------------------------+----><
+-FROMPROCESS--------------+ +-TOPROCESS--------------+
'-FROMACTIVITY(data-value)-' '-TOACTIVITY(data-value)-'
Conditions: ACTIVITYERR, CONTAINERERR, INVREQ, IOERR, LOCKED
Description
MOVE CONTAINER (BTS) moves a data-container
(and its contents) from one BTS activity to another. After the move, the source
container is destroyed.
The source and target containers are identified
by name and by the activities that own them. The activity that owns the source
container can be identified:
- Explicitly, by specifying the FROMPROCESS or FROMACTIVITY option.
- Implicitly, by omitting the FROMPROCESS and FROMACTIVITY options. If these
are omitted, the current activity is implied.
Similarly, the activity that owns the target container can be identified:
- Explicitly, by specifying the TOPROCESS or TOACTIVITY option.
- Implicitly, by omitting the TOPROCESS and TOACTIVITY options. If these
are omitted, the current activity is implied.
You can move a container:
- From the current activity to a child of the current activity
- From a child of the current activity to the current activity
- From the current activity to the current activity (thus renaming the container)
- From one child of the current activity to another
In addition,
if the current activity is the root activity, you
can move a container:
- From the current process to the current (root) activity
- From the current process to a child of the current activity
- From the current process to the current process (thus renaming the container)
- From the current activity to the current process
- From a child of the current activity to the current process
You can use MOVE CONTAINER, instead of GET CONTAINER and PUT
CONTAINER, as a more efficient way of transferring data between activities—for
an explanation, see
Container commands .
Note: - If the source container does not exist, an error occurs.
- If the target container does not already exist, it is created. If the
target container already exists, its previous contents are overwritten.
- You cannot move containers from one process to another. Both the source
and target containers must be within the scope of the current process.
- Only the root activity can specify a process-container as the source or
target of a MOVE CONTAINER command.
A process's containers are not the
same as its root activity's containers.
See also GET CONTAINER (BTS) and PUT CONTAINER (BTS).
Options
- AS(data-value)
- specifies
the name (1–16 characters) of the target container. If the target container
already exists, its contents are overwritten.
- CONTAINER(data-value)
- specifies
the name (1–16 characters) of the source container that is to be moved.
- FROMACTIVITY(data-value)
- specifies
the name (1–16 characters) of the activity that owns the source container.
If specified, this option must name a child of the current activity (or the
current activity itself).
- FROMPROCESS
- specifies
that the source container is owned by the current process—that is, the process
that the program that issues the command is executing on behalf of.
- TOACTIVITY(data-value)
- specifies
the name (1–16 characters) of the activity that owns the target container.
If specified, this option must name a child of the current activity (or the
current activity itself).
- TOPROCESS
- specifies
that the target container is owned by the current process—that is, the process
that the program that issues the command is executing on behalf of.
Conditions
- 109 ACTIVITYERR
- RESP2
values:
- 8
- The activity named on the FROMACTIVITY or TOACTIVITY option could not
be found.
- 110 CONTAINERERR
- RESP2
values:
- 10
- The container named on the CONTAINER option could not be found.
- 26
- The process container named on the CONTAINER option is read-only.
- 16 INVREQ
- RESP2
values:
- 4
- The command was issued outside the scope of a currently-active activity.
- 25
- The FROMPROCESS or TOPROCESS option was used, but the command was issued
outside the scope of a currently-active process.
- 17 IOERR
- RESP2
values:
- 30
- An input/output error has occurred on the repository file.
- 31
- The record on the repository file is in use.
- 100 LOCKED
- The
request cannot be performed because a retained lock exists against the relevant
record on the repository file.