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:
[[email protected] exec]$ cat COMPLETION.TEST_JOB_OUT
date > $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.