$componentname

Return the name of the component from which the specified instance was created.

$componentname { (InstanceName) }

Parameters

Parameters
Parameter Data Type Description
InstanceName String Name of the component instance. If omitted, the current instance is used.

Return Values

Name of the component from which the specified instance was created, in uppercase. An empty string ("") is returned if an error occurred.

Values of $procerror Commonly Returned Following this Function
Value  Error constant Meaning
-1106 <UPROCERR_COMPONENT> The component name is not valid.
-1304 <UPROCERR_UNKNOWN_CONTEXT> Function not allowed, unknown context. The InstName argument was omitted and no instance is current, for example, in the apStart trigger.

Use

Allowed in all component types.

Tracing Application Execution

You can use the value in $instancename and $componentname to help trace an application's execution. For example:

operation exec
putmess "Started instance %%$instancename of %%$componentname at %%$clock"
edit
putmess "Terminated instance %%$instancename at of %%$componentname %%$clock"
end ; end exec

Related Topics