Specifying Custom Log File Names
By default the submitjob and threadpoolworker utilities will create logs in a specific location. For example:
User Exit
Platform
Default Location and Name
submitjob.sh
Unix
$SPLOUTPUT/submitjob.{batchCode}.{sysDateTime}.log
threadpoolworker.sh
Unix
$SPLOUTPUT/threadpoolworker.{sysDateTime}.{pid}.log
Where:
{batchCode}
Batch Control used for job
{sysDateTime}
System Date and Time in YYYYMMDDHHmmSSSSS format
{pid}
Process Id
If your implementation wishes to implement custom log file names then this may be achieved using user exits which allow custom setting of the file name pattern. In the utilities an environment variable is set to the name and location of the log file. The user exit may be used to set this environment variable to an alternative. The user exit contains the script code fragment used to set the log file environment file name.
The table below lists the user exit, environment variable name and the platform
User Exit
Platform
User Exit Name
Env Variable
submitjob.sh
Unix
submitjob.sh.setvars.include
SBJLOGID
threadpoolworker.sh
Unix
threadpoolworker.sh.setvars.include
TPWLOGID
Additionally, internal session variables are available for use in the user exits:
Variable
submitjob
threadpoolworker
Comments
RUNOPTS
 
x
Runtime Options
batchCode
x
 
Batch Code
sysDateTime
x
 
Run Date and Time
Note: submitjobs are set for the Java runtime.
Note: Other environment variables in the session can be used and determined in the user exit script code.