The _lastrc built-in variable holds the UDM return code of the last UDM command issued.
_lastrc also has two special attributes: message and result.
message |
Contains a human-readable string indicating what happened with the last executed statement.
|
result |
Holds an integer value that indicates the result of the last command executed. This value does not affect the value of _rc and _lastrc. |
_lastrc cannot be set using the set command.
A Stonebranch Tip
You can use _lastrc in combination with the if statement to take action based on the return value of the previously issued command:
copy src=myfile if $(_lastrc) EQ 0
delete src=myfile
end