Teradata PT constructs a unique identifier for each job submitted for execution. Even though it is not generated until your job executes, you can reference its unique job identifier in your job script via the new script keyword $JOBID and $$JOBID.
- Use $JOBID to get the job identifier as a quoted string.
- Use $$JOBID to get the job identifier as an unquoted token but with the underscore character replacing the hyphen between the job name and the job sequence number.
For example, $JOBID becomes 'ws150002-02335' and $$JOBID becomes ws150002_02335.
The $JOBID and $$JOBID feature allows you to use the unique Teradata PT-constructed job identifier in the names of script items, which can be especially useful for items that persist after job execution such as log files.