:PSET
Script statement: Stores a value in an object variable and passes it to the parent object.
Syntax
:PSET Object variable = Value
Syntax |
Description/Format |
---|---|
Object variable |
Name of an object variable in which a value should be stored. Object Variables store values that can be used throughout an object. They are defined on the Variables page of an executable object or with the :PSET script statement. You must always use an ampersand symbol (&) that precedes the script variable's name, and it is recommended that you use a hash (#) symbol to signal the end of the variable's name The length of a script variable's name for the :PSET and :RSET is limited to 31 characters. All characters of the alphabet, the numbers 0-9, and the following special characters can be used:"$", "_", "@", "ยง" and "#". German Umlauts are not allowed. The first character after the leading "&" must neither be a number nor a "$" symbol. For more details about the syntax, see Syntax. Format: script variable |
Value |
Value that should be assigned to the object variable. |
Important!
- The setting "Generate at runtime" greatly affects objects. Subsequent modifications in object variables do not affect the script if it has already been generated.
- Object variables are not always passed on to tasks. You can define in each object if values can be inherited and which of them should be inherited from the superordinate task.
- In nested workflows, :PSET does not pass on object variables. These are only replaced or added in the particular workflow which contains the that task the script statement :PSET addresses.
- Inherited object variables that have not been defined in the task itself are only available as long as the task is shown in the Process Monitoring perspective. If restarted, the job can only access the object variable &HOST# (see example below) if the file transfer plus the workflow are still available in the Process Monitoring perspective.
Notes:
- Object variables are stored in the Variables & Prompts tabs of objects.
- The workflow that includes the job that uses :PSET is called processor or parent.
- Replaces or adds the object variable in the task.
- Replaces or adds the object variable in the parent.
Below are the individual steps of :PSET:
- The modified value only applies for the execution of tasks. It is not permanently stored in the object itself.
- The value of the script variable that is set with :PSET will never be passed on to a Schedule or Period Container.. It is only passed on to the next workflow one level above (parent) and not to the top workflow (such as grandparents or great-grandparents).
Example
A workflow contains the two objects "MM.GET.FILES" and "MM.END.PROCESSING". The setting "Generate at runtime" has been specified in both objects in order to ensure that their scripts are only generated when it is their turn.
The file transfer checks the environment and changes the object variable &HOST# if required.
:PSET &HOST# = "unix01"
See also:
Script element | Description |
---|---|
Assigns a value to a script variable and stores it in the activation report. |
|
Assigns a value to a script variable. |
|
Sets the values of script variables indirectly. |
Script Elements - Script Structure and Processing
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered by Function