:PSET
Use the :PSET statement to assign a value to an object variable. Object variables are stored on the Variables page in the object definition. These variables can be passed within the object, or to other tasks in the Workflow that use the object. The modified value applies to the current execution of the task only, and is not permanently stored in the object itself.
The :PSET statement first replaces or adds the object variable to the current task. :PSET also replaces or adds the object variable in the parent object. This statement can only pass values up one level, to the parent object, which is also known as the processor. The statement does not pass values up higher than one level, so you cannot pass object variables the to grandparent or great-grandparent of the task. :PSET lets other child tasks of a Workflow inherit variables set by another child task.
Syntax
:PSET Object variable = Value
Parameters
-
:PSET
Assigns a value to the object variable and passes it to the parent object -
Object variable
Name of the object variable
Format: script variable
Follow the rules for variable names. For more information, see Variable Names. -
value
Value to assign to the object variable
Format: script literal, script variable, or script function
Important!
- Any value of a script variable that you set with the :PSET statement is never passed on to Schedule or Period objects.
- The :PSET statement does not pass object variables within nested Workflows. In nested Workflows, object variables are only replaced or added in the particular Workflow which contains the task that the :PSET statement addresses.
Notes:
- Individual tasks only inherit object variables if they are configured to do so. Set the Inherit from parent setting on the Variables page in the object definitions of the child tasks to inherit object variables from the parent Workflow.
- Inherited object variables that have not been defined in the task itself are only available while the task is shown in the Process Monitoring perspective. If you restart the Job, those object variables are only available while the task and workflow are shown in the Process Monitoring perspective.
- If the object is generated at activation time, subsequent modifications to object variables do not affect the script. Select the Generate Task at Runtime option in the object definition to ensure that subsequent modifications are applied.
More Information:
Example
A Workflow contains two objects. One is a File Transfer object that is called MM.GET.FILES, the other is a Job that is called MM.END.PROCESSING. In both objects, the Generate Task at Runtime setting is configured. Assume that the File Transfer object check the environment to select the appropriate agent. When the Job runs, the check determines that the UNIX Agent is required.
The following script statement changes the object variable &HOST# to the UNIX Agent:
:PSET &HOST# = "unix01"
See also: