Script statement: Registers a file as an external Job output.
:REGISTER_OUTPUTFILE File, User Login
Fully qualified path and name of the file that should be registered as a Job output.
Wildcard characters are not allowed. Always specify the absolute path.
Format: Script literals
Use the User's Login.
Allowed values: "Y" or "N"
Format: Script literals
Automic strongly recommends you copy the Include objects REGISTER.OUTPUTFILE.WINDOWS and *.UNIX from the system client's REGISTER folder to that folder into any other client of the AE system, before you adapt them to your needs.
Explanation: After delivery of new initial data by Automic, these Include objects in the system client will be overwritten with the default data.
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 agent 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 report dialog of the default Job output. There, the file can be opened or stored directly via the UserInterface.
The following sample script of a Windows Job writes the file list 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
In this example an external output file will be registered, when you use Perl in an external interpreter script in the Process tab of a Job object:
: IF&$EXT_INTERPRETER# = 'PERL'or 'perl' or 'Perl'
system("&UC_JOBMD JNR=&UC_REALNR MNR=&UC_MANDANT PNR=&UC_IP_PORT IPA=&UC_IP_ADR TYP=O ULOGIN=&uc_register_ulogin OUTFILE=\"&uc_register_ofile\"");
Script Elements - Script Structure and Processing
Script Elements - Alphabetical Listing
Script Elements - Ordered by Function