Previous Topic: UNIX/Linux Configuration Environment VariablesNext Topic: Monitor Workload Status


Environment Variables for Jobs and Actions

When the CA NSM JM Option submits a job for execution as a Windows process, several environmental variables are set with information you may find useful. The programs or .BAT files executed as part of a job's submission can reference these variables, but the variables cannot be altered.

JOBSET

Specifies the name of the CA NSM JM Option jobset.

JOBNAME

Specifies the name of the job within the identified jobset.

JOBJNO

Specifies the job number associated with the identified jobset and job.

JOBSTATION

Specifies the CA NSM JM Option station to which the job was submitted.

JOBQUAL

Specifies the CA NSM JM Option job qualifier.

JOBNODE

Specifies the computer name (node ID) associated with the job.

JOBNUMBER

Specifies the unique job identifier assigned by the CA NSM JM Option for internal use.

JOBSUBFILE

Specifies the command string the CA NSM JM Option submitted to start this job.

JOBUSER

Specifies the user ID for which the job was submitted.

The following sample BAT file references settings within the following submitted job definition:

define jobset id=Trees
define job id=(Trees,Oak,01) station=AMERICA autosel=yes
define jobparm id=(Trees,Oak,01)subfile=Oak.bat

The OAK.BAT file contains the following:

@echo Off
set ID=%JOBSTATION%: Job(%JOBSET%,%JOBNAME%,%JOBJNO%) Qual(%JOBQUAL%)
cawto %ID% Phase 1 has ended
cawto %ID% Phase 2 has ended

If job Oak is selected or demanded, the following messages are sent to the Event Console Log:

AMERICA: Job(Trees,Oak,01) Qual(3001) Phase 1 has ended
AMERICA: Job(Trees,Oak,01) Qual(3001) Phase 2 has ended