Chapter Contents

Previous

Next
_runAgent

_runAgent



Run an agent defined to the DOMAIN Server.


Syntax
Syntax Description

Syntax

CALL SEND(agentInst, '_runAgent ', agentName, runKey, rc <, descriptor, runLoc, securityInfo, notifQueue, notifType, notifDisp>);

Syntax Description

Where... Is type... And represents...
agentName C name of agent to run
runKey N run instance key
rc N return code
descriptor C optional text description
runLoc C optional host location to run agent
securityInfo C optional security information
notifQueue C optional asynchronous notification queue name
notifType C optional run notification form
notifDisp C optional notification spool disp

_runAgent method
runs an agent that is defined to the DOMAIN server. If the preview buffer is empty when _runAgent is invoked, the agent must have already been defined by using the _defineAgent method. Otherwise, the SAS statements within the preview buffer are collected and executed when the agent runs.

agentName
is an agent that has been defined to the DOMAIN server using the _defineAgent method.

runKey
is returned from the _runAgent method and can be used to retrieve the run information for this particular run.

rc
parameter identifies whether the launch of the agent run was successful.

All parameters that follow the rc parameter are optional and positional. These parameters are

descriptor
is a user-specified text description of the agent.

runLoc
identifies the host and spawner on which the agent should actually run when it executes. The agent may be defined to the DOMAIN server that exists on host A, but the agent may actually be defined to execute on host B. For example, the following specification indicates the spawner is running on the node HOSTB.XYZ.COM and has a service name of SPAWNSRV:
//hostb.xyz.com/spawnsrv

Note:   Windows and OS/2 hosts do not require the service name. All other hosts require both the node name and service name.  [cautionend]

securityInfo
is the userid.password specification that is needed when the agent actually runs (executes) on a given host. This may be different from the userid and password that are specified in the _setDomainInfo method. In that case, userid.password communicates with the DOMAIN server when it runs secured. In this case, userid.password launches the agent on the specified host by using runLoc.

notifQueue
identifies the name of the queue in which to send a message when the agent has successfully executed. This queue can then be checked periodically by querying the queue to see if there is a message. A message TYPE value of 65539 is reserved and indicates that this message was sent as a result of an agent run completion. The header parameter from the query can then be evaluated. The header will contain the following named items:

AGENT_NAME
identifies the name of the agent that ran.

AGENT_RUN_COMPLETION_STATUS
can be used to determine whether the agent run was successful.

AGENT_RUN_KEY
can be used to retrieve the spool from the run instance.

AGENT_RUN_DATETIME
is the date and time the agent was run.

DESCRIPTOR
is a user-specified text description of the agent run.

notifType
indicates the form of the agent run-completion notification message. The following values are supported:

COMPLETE
indicates that only completion notification occurs.

FULL
indicates that along with completion notification, the run log and listing output spool are included with the notification.

LOG
indicates that along with completion notification, the run log spool is included with the notification.

LIST
indicates that along with completion notification, the run listing output spool is included with the notification.

notifDisp
indicates whether the run spool is retained. The following values are supported:

RETAIN
indicates that the run spool is retained after run-completion notification. The user must execute the _purgeAgentRunInfo method to delete the spool.

PURGE
indicates that the run spool is deleted subsequent to notification.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.