Built-in Variables

In addition to user-defined parameters, you can use the following built-in variables:

Built-in Variables

Variable

Description

DSTASKID

ID of the current task (meaningless if not in task block)

DSJOBID

ID of the current job. If submitted using the bsub switch, this indicates the batch ID.

DSWORKDIR

The temporary directory for job files. This is an Engine-side variable. This directory is in the Engine installation directory, typically ./work/machinename-i/tmp/session-ID, where machinename is the name of the Engine host; i is the instance, starting with 0; and session-ID is the Service Session ID for the PDriver Job.

The Engine periodically deletes the tmp directory. To set the frequency of deletion, set Temp File Time-to-Live (hours) in each Engine Configuration.

DSENGINEHOME

The Engine home. This is an Engine-side variable.

DSSTAGEDIR

The Alias for the Manager staging directory. You can use this as a source or destination directory for the copy command. Files in this directory are automatically deleted periodically.

DSOS

The OS of the current system (for example, “linux”, “win32”, “plinux”)

It is important to put any temporary files in the DSWORKDIR directory. If you put them elsewhere and a task is interrupted, the files stay on the computer and are never automatically removed.

You can use automatic variables such as $1, $2, $3, and so on to reference arguments to the PDriver command that follow the script file name. You can use the automatic variable $* to reference these automatic variables collectively as a string. To create an array of all command-line arguments, use split($*).

Arguments to the PDriver command that follow the script file name be referenced with the automatic variables $1, $2, $3 ... These variables also be referenced collectively as a string using the automatic variable $*. To create an array of all command-line arguments, use split($*).

$? contains the execution status of the last execute command.