:ATTACH_RES

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 Tab of Job objects (JOBS) on Windows or UNIX.

Syntax

:ATTACH_RES ObjectName, ResourceName, [Usage], [Variable]

Key

Description/Format

ObjectName

Name of the Storage object

ResourceName Name of the resource you attach, i.e. want to transfer to the agent.
Usage

Allowed values:

  • "T": Task specific; the resource will be transferred by using a task specific cache
  • "C": Client-wide; a client-wide cache is used for transfer of resource files

Default value: "T"

Variable

(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"

This key may only be used on resources with these attributes:
Type="Text" and Usage="Task-specific"

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

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.

Comments

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.

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.

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.

You also may transfer resources into a special directory by using :ATTACH_RES first and then copy files by using an external script.

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 variable UC_SYSTEM_SETTINGS.

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 Tab. This has performance reasons.

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.

Examples:

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

See also: