Automation Engine Script Guide > Ordered by Function > Handle Objects > :REGISTER_OUTPUTFILE

:REGISTER_OUTPUTFILE

Script statement: Registers a file as an external jobAn Automation Engine object type for a process that runs on a target system. output.

Syntax

:REGISTER_OUTPUTFILE File, User Login

Syntax

Description/Format

File

Fully qualified path and name of the file that should be registeredThis is the status of a task that runs within a group and is waiting for its start. as a job output.

Wildcard characters are not allowed. Always specify the absolute path.

Format: script literals

User Login

Use the userIn the Automation Engine, a user is an instance of a User object, and generally the user is a specific person who works with Automic products. The User object is assigned a user ID and then a set of access rights to various parts of the Automation Engine system and product suite. These access rights come in the form of Automation Engine authorizations and privileges, Decision user roles and EventBase rights and ARA web application object rights. You can manage all these centrally in the ECC user management functions. See also, Unified user management.'s loginAn Automation Engine object type that stores account credentials used by agents on target systems..

Allowed values: "Y" or "N"

Format: scriptA particular Automation Engine object type. literals

Comments 

You can only use this script statement in the Process tab of UNIX and Windows jobs.

External files can also be registered as job output using the Output tab. The difference lies in the registration time: The files of the Output tab are registered immediately when the job is executed, regardless of whether the job could create the file or not. If the script element is used, the specified file is only registered when it is called.

The specified file must be stored on the computer of the agentA program that enables the de-centralized execution of processes (such as deployments) on target systems (computers or business solutions) or a service that provides connectivity to a target system (such as for databases or middleware). An agent is also an object type in the Automation Engine. [Formerly called "Executor."] See also: host on which the job is executed or must be accessible from there. It makes sense to only specify files that are generated by the job.

After the job has been executed, the file is listed in the Directory tab and in the reportA report provides more detailed information about a task's execution or a component. dialog of the default job output. There, the file can be opened or stored directly via the UserInterfaceThis is the Automation Engine's graphical user interface. [Formerly called the "Rich Client", "RichGUI" and "Dialog Client."].

Example

The following sample script of a Windows job writes the file listShows entities in a grid view of the directory C:\temp to the file C:\temp\test.txt. The system then verifies whether the command could successfully be executed. If so, this file is registered as job output. Otherwise, the job aborts.

dir C:\temp /S >> C:\temp\test.txt
@set retcode=%errorlevel% !
@if NOT %ERRORLEVEL% == 0 goto :retcode
:REGISTER_OUTPUTFILE "C:\temp\test.txt", "N"

 

See also:

 

 

 


Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support

Copyright © 2016 Automic Software GmbH