2.0 Submitting and managing jobs > 2.1 Job submission > 2.1.7 Exported batch environment variables

2.1.7 Exported batch environment variables

When a batch job is started, a number of variables are introduced into the job's environment that can be used by the batch script in making decisions, creating output files, and so forth. These variables are listed in the following table:

Variable Description
PBS_JOBNAME User specified jobname
PBS_ARRAYID Zero-based value of job array index for this job (in version 2.2.0 and later)
PBS_O_WORKDIR Job's submission directory
PBS_ENVIRONMENT N/A
PBS_TASKNUM Number of tasks requested
PBS_O_HOME Home directory of submitting user
PBS_MOMPORT Active port for MOM daemon
PBS_O_LOGNAME Name of submitting user
PBS_O_LANG Language variable for job
PBS_JOBCOOKIE Job cookie
PBS_NODENUM Node offset number
PBS_O_SHELL Script shell
PBS_O_JOBID Unique pbs job id
PBS_O_HOST Host on which job script is currently running
PBS_QUEUE Job queue
PBS_NODEFILE File containing line delimited list on nodes allocated to the job
PBS_O_PATH Path variable used to locate executables within job script

Related topics