$SETSTATUS (set status)
$SETSTATUS changes the status of a process.
Syntax
$SETSTATUS(status-constant)
Values
-
status-constant
Specifies NORMAL (normal end), NODATA (no data exists), ERROR (an error occurred), or MULTI (another user is currently updating), either as a constant or a reserved string. A constant (NORMAL, ERROR, NODATA, or MULTI) must be enclosed in single quotation marks ('').
Status
status-constant becomes the specified status. If an invalid status constant is specified, the script processing is interrupted.
Example
The following example searches all asset information items whose status is stock (301), updates their status to active (002), and terminates processing:
[ASSET_ITEM_LOOP] [CLASS_FIND] AssetInfo [FIND_DATA] (AssetInfo.AssetStatus = '301')AND (AssetInfo.AssetKind = '001') [GET_VALUE] ASSETID = AssetInfo.AssetID [UPDATE] AssetInfo [DATA] AssetInfo.AssetID = ASSETID AssetInfo.AssetStatus = '002' [SET_VALUE] $SETSTATUS('NORMAL') [ASSET_ITEM_LOOP_END]