Custom Output registration

Document ID : KB000090129
Last Modified Date : 14/04/2018
Show Technical Document Details
Custom Output registration
Detailed Description and Symptoms
How to register custom output files for jobs so that they can be viewed in the output tab for the job when they have moved to history.

At times there are jobs that have files in addition to the system and the job output (eg: a report) which need to be registered and then viewed for the job related to that report. The main purpose of this is to make it easier for the operators and users of the system to keep a track of the success (or failure) of jobs that are run on the system

The FILESIZE command in Applications Manager is used to do all output registration. We will use this command to register any output for the job. The FILESIZE command can be run either directly through the job itself (if it is a shell or a kind of executable script) or via a COMPLETION script. The commands used in either of the scripts would be very similar (if not identical) and is mainly a matter of preference. At times it may be easier to use a COMPLETION script especially if this is something that is being done for several jobs as COMPLETION scripts can be specific to Applications, Users, Program Types, commands or job names.

We use a COMPLETION script as we want the output to be registered irrespective of the jobs success (SUCCESS) or failure (TROUBLE).
A small example to display how custom output registration can be handled for TEST_JOB.
1. Create a file called COMPLETION.TEST_JOB in the $AW_HOME/exec directory.
2. The contents of the file will be as follows:

[qa4@localhost exec]$ cat COMPLETION.TEST_JOB_OUT
touch $AW_HOME/out/c.$jobid.log
date > $AW_HOME/out/c.$jobid.log
$SQLOPER_HOME/exec/FILESIZE $AW_HOME/out/c.$jobid.log

3. In the above example we are creating a custom yet dynamic file for each run of the job and then registering this file as the jobs output.

The above example can be used to register pre-existing output files or output files that may be created using other naming conventions. In that case, we will need to know the variables that are being used for the creation of the file and use them in FILESIZE as required.