:PUT_ATT

Use the :PUT_ATT script statement to change the value of object attribute during the generation process. Attributes defined for an object affect how the object is processed. This script statement lets you dynamically change those object attributes and assign new values when the task is generated. The new values are only valid for the current generation and are not permanently stored in the object.

When you dynamically change object attributes, be aware of the order in which scripts are processed in the Process pages, and the stages of execution. Changing attributes is only useful before an object is processed, and may lead to undesired outcomes if you do not consider the stages of execution.

Example: a task is configured to be generated at runtime. A :PUT_ATT statement on the Pre-Process page of the task sets the queue (QUEUE attribute). However, the system checks available slots and the status of the queue before it processes the script on the Pre-Process page. The task starts in the queue that you set with the :PUT_ATT statement, but the limit of the new queue is not verified, and the task may start too early.

More Information:

Syntax

:PUT_ATT Attribute = Value

  • :PUT_ATT
    Changes the value of an attribute

  • Attribute
    Name of the attribute to change
    Format: AE name

  • Value
    New value to assign to the attribute
    Format: Script literal, script variable or script function

Notes:

  • The value that you can assign to a given attribute depends on the system environment.
  • If the object is configured to generate the task at runtime, then you cannot change the start type of the object through a :PUT_ATT statement.
  • Attributes can have different maximum lengths. The :PUT_ATT statement does not check the specified value. If the value exceeds the maximum allowed length of the attribute, then the value is truncated.
  • The statement does not modify the contents of script variables.
  • If you want to set the following attributes, you must use the :PUT_ATT statement on the Pre-Process page:
    • ATTR_DLG
    • HOST
    • SYSLST_DB
    • SYSLST_FILE
    • SYSOUT_DB
    • SYSOUT_FILE
    • OL
    • OO (BS2000 Jobs)

Important:

  • Do not use the :PUT_ATT on the ! Process page of an Event object or on a Post Process page. This statement has no effect when you use it on those pages.
  • You can only change the attributes of a particular object such as the Login object with a :PUT_ATT statement if the user has write access (W) to both the old value and the new value of the attribute.
  • You can only assign the start type " " to a Job that starts immediately or to a group that has already been defined. Any other specification causes an error during generation.
  • You cannot use a :PUT_ATT statement to change the Agent Group. Agent Groups are resolved, and the Agent is selected, before the script is processed. You can however use the statement to select a different Agent. Use the PREP_PROCESS_AGENTGROUP script function to read the Agents in an Agent Group. For more information, see PREP_PROCESS_AGENTGROUP.
  • :PUT_ATT commands that have been defined in earlier versions of Rapid Automation Agents may no longer work when attributes of RA Jobs change in new versions of the Rapid Automation agents. Use object variables for field replacements instead of :PUT_ATT commands for Rapid Automation specific attributes. For more information, see Variables Page.

Tip: You can use this script statement on the Process page in order to limit the maximum number of parallel runs (attribute: MAX_PARALLEL_TASKS). In this case, the limit is only checked after the script has been processed when the task is generated at runtime.

Examples

:SET &TYPE# = GET_ATT(EVENT_TYPE)
:PUT_ATT EVENT_CHECK_METHOD2 = "FILE_STABLE"
:PRINT &TYPE#

The GET_ATT script function assigns the value FA to the script variable &TYPE#. After the :PUT_ATT call, the event type is FT because the attribute FILE_STABLE belongs to the file system event. The variable &TYPE# still includes the value FA.

The following example shows how to assign a new Agent to an object:

:PUT_ATT HOST = "UNIX02"

See also: