Script statement: This statement is used in conjunction with the Storage object to specify the resources you want to use with the UNIX or Windows agent. You may use it in a script in the Process page of Job objects (JOBS) on Windows or UNIX.
:ATTACH_RES ObjectName, ResourceName, [Usage], [Variable]
Name of the Storage object
|ResourceName||Name of the resource you attach, i.e. want to transfer to the agent.|
Default value: "T"
(optional) An Automation Engine variable replacement is performed for a text type storage resource right before it is transferred to the agent.
Allowed values: "Y"[es] or "N"[o]
Default value: "N"
Warning! This key may only be used on resources with these attributes:
Note: You may use the following System variables with :ATTACH_RES to get information about the absolute paths of resources:
|Variable name||System location|
|&$AGENT_RESOURCES_CLIENT#||client wide cache directory|
|&$AGENT_RESOURCES_TASK#||task specific cache directory|
Note: As resources are attached to the Storage object, paths will be defined in the Automation Engine system, but are not visible to the user. Using these variables you will be able to have details displayed in the Job object's report.
This script statement will determine the resources to be attached to the Storage object for transfer to the OS agent, either on Windows or on UNIX.
Note: The agent creates a list of all files to be transferred for a job, where :ATTACH_RES is specified. If the transfer of listed files is unsuccessful, the agent will cancel the job.
Note: As the agent transfers information about OS, hardware and platform to the Automation Engine system, the Automation Engine system transfers only resources from the Storage object that fit these values.
Note: You also may transfer resources into a special directory by using :ATTACH_RES first and then copy files by using an external script.
Warning! The size of resources is limited. As of version 11 you may attach and transfer up to 71 MB (74448896 bytes).
To set a lower limit, use the key MAXIMUM_STORE_RESOURCE_SIZE in the system settings. For more information, see UC_SYSTEM_SETTINGS - Systemwide Settings.
Warning! In a text-type resource, system variables will only be replaced with their corresponding values, when the same system variable is used in the Process page. This has performance reasons.
Warning! If you try to transfer text type resources with variable replacement set to "Yes" into the client-wide cache, an error message will be displayed.
In the following example all resource files contained in the Storage object are transferred:
:ATTACH_RES "STORAGE12", "*"
This example will transfer all resources where the name starts with the expression "file"
:ATTACH_RES "STORAGE12", "file*"
The third example transfers all resources into a client-wide cache.
:ATTACH_RES "STORAGE12", "*", C
This example conducts a variable replacement for all transferred files:
:ATTACH_RES "STORAGE12", "*.ini", ,Y
In this example the above mentioned System variables for :ATTACH_RES are used to attach a .jar-file which then is started with Java:
:ATTACH_RES "PCK.AUTOMIC_SIEBEL.PRV.STORE", "SIEBELTOOL.JAR", C
JAVA -JAR "&$AGENT_RESOURCES_CLIENT#SIEBELTOOL.JAR" SIEBEL IMPORTBUSINESSOBJECT